mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
test azure tts
This commit is contained in:
parent
acf3802bee
commit
84f55a6df7
3 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -161,3 +161,4 @@ examples/nb/
|
|||
workspace/*
|
||||
*.mmd
|
||||
tmp
|
||||
output.wav
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ class AzureTTS(Action):
|
|||
|
||||
# 参数参考:https://learn.microsoft.com/zh-cn/azure/cognitive-services/speech-service/language-support?tabs=tts#voice-styles-and-roles
|
||||
def synthesize_speech(self, lang, voice, role, text, output_file):
|
||||
subscription_key = self.config.get('SUBSCRIPTION_KEY')
|
||||
region = self.config.get('REGION')
|
||||
subscription_key = self.config.get('AZURE_TTS_SUBSCRIPTION_KEY')
|
||||
region = self.config.get('AZURE_TTS_REGION')
|
||||
speech_config = SpeechConfig(
|
||||
subscription=subscription_key, region=region)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ def test_azure_tts():
|
|||
"你好,我是卡卡",
|
||||
"output.wav")
|
||||
|
||||
# 运行需要先配置SUBSCRIPTION_KEY
|
||||
# 运行需要先配置 SUBSCRIPTION_KEY
|
||||
# TODO: 这里如果要检验,还要额外加上对应的asr,才能确保前后生成是接近一致的,但现在还没有
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue