Microsoft Azure AI语音服务

一:文字转语音SDK安装

安装语音 SDK - Azure AI services | Microsoft Learn

二:基于文本转语音Rest API

文本转语音 API 参考 (REST) - 语音服务 - Azure AI services | Microsoft Learn

三:基于文本合成语音

如何基于文本合成语音 - 语音服务 - Azure AI services | Microsoft Learn

// YourSpeechKey : 私钥;YourSpeechRegion:区域
public static void main(String[] args) {
		 SpeechConfig speechConfig = SpeechConfig.fromSubscription("YourSpeechKey",     "YourSpeechRegion");
		 speechConfig.setSpeechSynthesisLanguage("en-US");
		 speechConfig.setSpeechSynthesisVoiceName("en-US-AvaMultilingualNeural");
		 // set the output format
		 speechConfig.setSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat.Riff24Khz16BitMonoPcm);
		 SpeechSynthesizer speechSynthesizer = new SpeechSynthesizer(speechConfig, null);
		 SpeechSynthesisResult result = speechSynthesizer.SpeakText("I'm excited to try text to speech");
		 AudioDataStream stream = AudioDataStream.fromResult(result);
		 stream.saveToWavFile("D:\\file.wav");
	 }

相关推荐

  1. Microsoft Azure AI语音服务

    2024-05-15 22:04:04       23 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-15 22:04:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-15 22:04:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-05-15 22:04:04       82 阅读
  4. Python语言-面向对象

    2024-05-15 22:04:04       91 阅读

热门阅读

  1. 卸载docker

    2024-05-15 22:04:04       30 阅读
  2. go get和go get -u

    2024-05-15 22:04:04       32 阅读
  3. nginx文件夹内文件解释<三>

    2024-05-15 22:04:04       34 阅读
  4. MySQL教程-创建一个表

    2024-05-15 22:04:04       25 阅读
  5. day3 leetcode20 有效的括号

    2024-05-15 22:04:04       28 阅读
  6. &与 && 的区别

    2024-05-15 22:04:04       30 阅读
  7. Pytorch学习-调整torchvision.models中模型输出类别数

    2024-05-15 22:04:04       36 阅读
  8. 代码随想录Day28

    2024-05-15 22:04:04       35 阅读
  9. 绘制奇迹:Processing中的动态图形与动画

    2024-05-15 22:04:04       35 阅读
  10. 深度学习实战:定制化智能狗门的迁移学习之旅

    2024-05-15 22:04:04       27 阅读