开发者

iPhone - API for Text to Speech feature [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Close开发者_JS百科d 4 years ago.

Improve this question

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.


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.


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.


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];


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.


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


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


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.


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


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


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.


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/


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 :)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜