简体   繁体   English

如何在 Google 文本到语音 API 中选择男性声音

[英]How to choose male voice in Google text to Speech API

I want male voice output from google text to speech API, is there any parameter to send for male voice, Now i'm getting female voice(default).我想要从谷歌文本到语音 API 的男性语音输出,是否有任何参数可以发送男性语音,现在我得到的是女性语音(默认)。 i'm Using below URL.我正在使用以下网址。 http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=Hello+world&tl=en Please help me to solve this. http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=Hello+world&tl=en请帮我解决这个问题。

Thanks & Regards感谢和问候

Thiru.蒂鲁。

According to the official REST API documentation ,根据官方 REST API文档

There is no way to configure the voice.无法配置语音。 Neither pitch, speed nor gender.无论是音高、速度还是性别。 However you can get the translated text and output it using Google's Text-to-speech.但是,您可以使用 Google 的文本转语音获取翻译后的文本并输出。 For this you need to manually download the male voice file.为此,您需要手动下载男性语音文件。 See Google Text-to-speech adds multiple male and female voicesGoogle Text-to-speech 添加了多个男性和女性的声音

you have to set pitch of voice you can not set male voice...你必须设置音高你不能设置男声......

 TTS.setPitch();

value u can set but it is very bad u should try another texttospeech engine or stay with default female voice.您可以设置值,但非常糟糕,您应该尝试另一个文本语音引擎或保持默认的女性声音。

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

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