Visual and programmatic text-to-speech on iOS
UIText2Speech consists of two parts: the visual controls and a rich API for integrating text to speech processing, translation between languages, creation of MP3 speech audio files and a UIText2Speech control to playing audio while showing the audio waveform. Uses Google Text to Speech and Translation API.
See Apple AppStore mText2Speech iOS universal app which is one of the many apps using this UIText2Speech API.
Use the UIText2Speech control to play text to speech results in your app or just use the API to add text to speech and language translation to any app.
UIText2Speech is a UIView subclass used to show a waveform of audio from text converted to speech or an audio file and can do auto translation to convert from one language to another. The resulting MP3 audio is played and a waveform representing the playing audio is shown.
The UIText2Speech control can play audio for text converted to speech or for a regular audio file. The component when playing highlights the area of the waveform that corresponds to portion of the audio being played.
Optional area for showing text of audio being played. If text auto translated to another language, then shows original language text and translated text.
Component displays running time and total time when playing audio and showing waveform.
Custom button and text colors can be used to style the component. Normal and minimal display modes available.
The API static methods can be used to easily add text to speech functionality to your app. You can read text in a specific language, translate text between languages, detect the language for text, create an MP3 audio of read or translated text, play audio for read or translated text, determine all the available locales and languages available.
The UIText2Speech control uses the API.
- Add saying of text in any language you desire to your app.
- Auto translate text to translate text from one language to another.
- Load and play text spoken in default or a specific language and show a visual waveform of the audio played.
- Load and play an audio file and show visual waveform.
- Automatically translate text between languages.
- Manually translate text between languages using the API.
- Show original and translated text.
- Manage and use locales and locale identifiers.
- Detect language text is in.
- Get an MP3 audio file for text using the API.
- Share an MP3 audio file to Email, Facebook, Twitter and other services.
- Play audio file using component or AVAudioPlayer.
- Customizable text and colors.
- Minimal display mode for component displaying just play/pause button.
This project supports iOS 7, iOS 8, iOS 9 and iOS 10.