iPhone - API for Text to Speech feature [closed]

一笑奈何 提交于 2019-11-26 08:58:54

问题


I was wondering if iPhone has any API that supports Text to Speech feature? I looked around but couldn\'t find any, so just want to confirm.

Thanking in anticipation.


回答1:


I ran into this problem at one point, and got Flite (festival lite) text to speech engine running on iPhone. I recently made an API class for it. I tried to make it easy (and free) to add to new and existing projects. It can be downloaded at here.




回答2:


The iPhone 3G S has the private VoiceServices framework which can do this. Steve Troughton-Smith describes how to use the private class VSSpeechSynthesizer here, but you have little chance of getting something using this into the App Store.




回答3:


For iOS 5 or 6 - nothing built-in. You need to use a third party library.

For iOS 7 there is a AVSpeechSynthesizer API.

Here's a simple example:

AVSpeechUtterance *utterance = [AVSpeechUtterance 
                                speechUtteranceWithString:@"Hello world"];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];



回答4:


OpenEars is an open-source iOS library for implementing round-trip English language speech recognition and text-to-speech on the iPhone and iPad, which uses the CMU Pocketsphinx, CMU Flite, and MITLM libraries.




回答5:


I found this but i haven't tried it yet.




回答6:


The API docs would suggest that the API is not available.




回答7:


You might also want to have a look at this.

It uses Flite. It doesn't contain specific instructions but it can give you ideas.




回答8:


For iOS 5 or 6 - nothing built-in. You need to use a third party library.

For iOS 7 there is a AVSpeechSynthesizer API.

Source Code also available in Github

Refer the Below Link




回答9:


This is possible, but you will have to roll your own. I have seen an app do this.




回答10:


I did this before iPhone 2.0 came out by porting espeak to the platform. I used it as a command line utility but it should be possible to make it into a library.




回答11:


you can try to use google tts:

http://translate.google.com/translate_tts?tl=en&q=hello

and some others:

http://www.ispeech.org/api

http://tts-api.com/




回答12:


Google TTS limited to 100 characters.

So you should split-up your long sentence in to small 100 character chunks and pass it to the Google TTS method.

You can achieve this through implementing below steps.

  • Split-up your long sentence in to small 100 character chunks.
  • Call Google TTS with first split 100 character string.
  • Play it using Google TTS & AVAudioPlayer
  • Implement AVAudioPlayer audioPlayerDidFinishPlaying delegate .
  • In that delegate, call Google TTS with second split 100 character string.
  • Call the process recursively until reach the last character.

Here is best One for me Google-TTS-Library-For-iOS library try it :)




回答13:


There's an Iphone app that does direct TTS, Search for "TTSMessenger" on Itunes



来源:https://stackoverflow.com/questions/1102244/iphone-api-for-text-to-speech-feature

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!