Text To Speech

Contents

Text to Speech plugin

https://github.com/vilic/cordova-plugin-tts

Ionic 文本转换语音Text To Speech插件的安装(Installation)

ionic cordova plugin add cordova-plugin-tts npm install @ionic-native/text-to-speech

Ionic 文本转换语音Text To Speech插件支持的平台(Supported Platforms)

  • Android
  • iOS
  • Windows Phone 8

Ionic 文本转换语音Text To Speech插件的用法(Usage)

import { TextToSpeech } from '@ionic-native/text-to-speech';

constructor(private tts: TextToSpeech) { }

...

this.tts.speak('Hello World')
  .then(() => console.log('Success'))
  .catch((reason: any) => console.log(reason));