如何创建TTS语音包?
我有一个小应用程序将文本转换为演讲,现在我正在使用microsoft的内置tts包来执行文本演讲,但是,我想让一位专业的声音艺术家创建一个新的文本来演讲语音包.问题是,我不知道如何创建声音包(TTS)
使用Visual Basic 2008进行英语语言的文本转语音
Dim speech As Object = CreateObject("SAPI.SpVoice")
speech.speak(TextBox1.Text)
Run Code Online (Sandbox Code Playgroud)
我的问题,这可以用于其他语言(口语!!!)?谢谢
我想将TextToSpeech引擎的输出写入我的应用程序的缓存目录.为了让TTS在那里写,我首先必须赋予它权限.但我不知道怎么做.我知道通常这样的问题可以通过交付一个FileDescriptor权限来解决,从而获得访问特定文件的权限.但我无法用TTS做到这一点,因为TextToSpeech.synthesizeToFile方法只接受文件路径为String,no FileDescriptor.那么该怎么办?
为了说明TTS真的没有权限写入我的应用程序的目录,这里是代码......:
TextToSpeech mTts = new new TextToSpeech(context, this);
mTts.synthesizeToFile(text, null, getCacheDir() + "/" + "speech.wav");
Run Code Online (Sandbox Code Playgroud)
和调试器日志:
08-20 14:46:11.257: ERROR/TtsService(336): Can't create
/data/data/com.myorg.myapp/cache/speech.wav due to exception java.io.IOException: Permission denied
Run Code Online (Sandbox Code Playgroud) 我使用TextToSpeech Class 制作了一个应用程序..但语音速度太慢..如何提高语音的速度..
其次声音来自主(小)扬声器..我想声音应该来自后扬声器(LoudSpeaker).
我正在创建一个应用程序,用印度英语将文本转换为语音.
我从一个站点得到了这个("英语,印度(en_IN)")值,但我不知道如何以及在何处
将此值设置为语言环境.请告诉我如何设置这种语言.
并且有必要为TextToSpeech更改移动设置.
提前致谢..
我目前在我的应用程序中使用Flite tts,男声很好.但是我的客户希望女性的声音也能正常工作.两种声音的处理时间之间存在着臭名昭着的差异(女性声音比默认声音延迟2秒).另一个障碍是TTS必须离线工作,所以DragonMobile和iSpeech不是一个选择.在您的意见中,最好的TTS库是什么,iOS延迟很小?有没有人见过flite 1.4的新版/修改版?我意识到我要么为Flite找到优化版本,要么更改我的库.我一直在看不同的帖子,其中大部分是很长一段时间,所以我希望有新的和更好的东西在那里.谢谢.
我需要开发一个简单的64位C++文本到语音(TTS)程序,以便在Windows 7和Vista上运行.我的第一步是尝试从SAPI 5.4教程编译程序.但我在Windows 7机器上找不到所需的SAPI 5.4软件包.我搜索了互联网,只有SAPI 5.1适用于Windows XP.
Microsoft Speech Technology页面声称"用于编程Windows 7中包含的语音引擎的本机代码API" .SAPI 5.4教程具有以下指令:
Step 1. Setting up the Project:
…
Code Listing 1
Next add the paths to SAPI.h and SAPI.lib files. The paths shown are for a
standard SAPI SDK install. If the compiler is unable to locate either file,
or if a nonstandard install was performed, use the new path to the files.
Change the project settings to reflect the paths. Using the Project->Settings.
menu item, …Run Code Online (Sandbox Code Playgroud) 我想知道是否可以在iOS7上同时播放音乐和某种文字转语音引擎.我正在使用Apple的新内置API,其中一个正在运行,而不是两者都有效.有人在想吗?我的TTS播放代码,也在后台工作
-(void)speak:(NSString*)string
{
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
NSError *setCategoryError = nil;
[audioSession setCategory:AVAudioSessionCategoryPlayback error:&setCategoryError];
NSError *activationError = nil;
[audioSession setActive:YES error:&activationError];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:string];
utterance.rate = 0.3f;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:[AVSpeechSynthesisVoice currentLanguageCode]];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];
}
Run Code Online (Sandbox Code Playgroud) 我们正在制作iPhone应用程序,客户希望提醒作为语音消息.
要求是用户将设置他们想要的时间和文本以进行提醒.
使用文本,我将转换为语音并在触发提醒时播放音频文件.
为此,我计划使用谷歌服务
http://www.translate.google.com/translate_tts?tl=en&q=helloE%20friend
播放这些文本并下载相同的音频文件.
NSString* userAgent = @"Mozilla/5.0";
NSURL *url = [NSURL URLWithString:[@"http://www.translate.google.com/translate_tts?tl=en&q=helloE%20friend"
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:url] autorelease];
[request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
NSURLResponse* response = nil;
NSError* error = nil;
NSData* data = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
[data writeToFile:@"/var/tmp/tts.mp3" atomically:YES];
Run Code Online (Sandbox Code Playgroud)
我可以使用这些代码,但客户端不想上网.
有没有可以在没有互联网的情况下进行文本到语音转换的图书馆(就像siri正在做的那样)?
任何有关这方面的信息都会很棒.
我想在演讲结束后setOnUtteranceProgressListener通知a Toast。似乎不起作用。我已经使用过setOnUtteranceProgressListener,在语音功能中,我提到了paramaters以下内容。
Bundle params = new Bundle();
params.putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, MainActivity.this.getPackageName());
Run Code Online (Sandbox Code Playgroud)
我在调用语音功能时给出了“ UniqueId”,如下所示。
myTTS.speak(message,TextToSpeech.QUEUE_FLUSH,params,"UniqueId");
Run Code Online (Sandbox Code Playgroud)
在program“文字转语音”引擎完成发言后的“ 我的”中,应运行Toast通知其已结束发言。但setOnUtteranceProgressListner似乎不起作用。
myTTS.setOnUtteranceProgressListener(new UtteranceProgressListener() {
@Override
public void onStart(String utteranceId) {
}
@Override
public void onDone(String utteranceId) {
Toast.makeText(MainActivity.this,"Finished speaking.",Toast.LENGTH_LONG).show();
}
@Override
public void onError(String utteranceId) {
}
});
Run Code Online (Sandbox Code Playgroud)
所有代码如下。
public class MainActivity extends AppCompatActivity {
String message;
private TextToSpeech myTTS;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myTTS = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override …Run Code Online (Sandbox Code Playgroud)