🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
test azure tts
geekan84f55a6df77a
diff --git a/.gitignore b/.gitignoreindex 7e592cfd2..94e2905f3 100644--- a/.gitignore+++ b/.gitignore@@ -161,3 +161,4 @@ examples/nb/workspace/**.mmdtmp+output.wavdiff --git a/metagpt/actions/azure_tts.py b/metagpt/actions/azure_tts.pyindex 3220cc32e..c01556303 100644--- a/metagpt/actions/azure_tts.py+++ b/metagpt/actions/azure_tts.py@@ -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-rolesdef 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)diff --git a/tests/metagpt/actions/test_azure_tts.py b/tests/metagpt/actions/test_azure_tts.pyindex 6fea0daf3..b5a333af2 100644--- a/tests/metagpt/actions/test_azure_tts.py+++ b/tests/metagpt/actions/test_azure_tts.py@@ -17,5 +17,5 @@ def test_azure_tts():"你好,我是卡卡","output.wav")- # 运行需要先配置SUBSCRIPTION_KEY+ # 运行需要先配置 SUBSCRIPTION_KEY# TODO: 这里如果要检验,还要额外加上对应的asr,才能确保前后生成是接近一致的,但现在还没有