简体   繁体   English

如何在文本到语音识别中更改语音?

[英]How to change voice in Text to Speech Recognization?

I create Text to Speech application which work normally but my problem is that i need 我创建了正常运行的文本到语音应用程序,但是我的问题是我需要
to change voice nation wise.Suppose now speech in US English and i want to convert it in Indian language.And also from women voice to men voice. 改变语音国家的智慧。假设现在使用美国英语讲话,我想将其转换为印度语言。而且也从女性声音转换为男性声音。
I try to find relevant answer but i didn't found anything.Please provide me some link, 我尝试找到相关答案,但未找到任何内容。请提供一些链接,
Tutorial or code. 教程或代码。
Thanks in Advance. 提前致谢。

You cannot change the voice of Android Text to Speech. 您无法将Android文本的语音更改为语音。 You can use TextToSpeech.setPitch(), however it only distorts the voice. 您可以使用TextToSpeech.setPitch(),但是它只会使声音失真。

You can change the language TextToSpeech uses language by using TextToSpeech.setLanguage(). 您可以通过使用TextToSpeech.setLanguage()来更改TextToSpeech使用的语言。 Just pass in the Locale of the language you want to use. 只需传递您要使用的语言的语言环境即可。

You can also set the language of the SpeechRecognizer to be any language you want such as English. 您还可以将SpeechRecognizer的语言设置为所需的任何语言,例如英语。

In terms of getting things working, here is my example code that uses both TextToSpeech and SpeechRecognition. 在使事情正常工作方面,这是我的示例代码,该示例代码同时使用TextToSpeech和SpeechRecognition。

Sample code 样例代码

Have a look at RecognizerIntent. 看看RecognizerIntent。 "String ACTION_RECOGNIZE_SPEECH Starts an activity that will prompt the user for speech and sends it through a speech recognizer." “字符串ACTION_RECOGNIZE_SPEECH启动一个活动,该活动将提示用户语音并通过语音识别器发送。

and you can also see this link 您还可以看到此链接

Android Speech Input: Android语音输入:

http://developer.android.com/resources/articles/speech-input.html http://developer.android.com/resources/articles/speech-input.html

Android voice recognition API example: Android语音识别API示例:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM