Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

feat: update text_to_image skill

莘权 马df5a50f6e677
diff --git a/metagpt/learn/text_to_speech.py b/metagpt/learn/text_to_speech.py
index b89b5a9c4..1b81097b8 100644
--- a/metagpt/learn/text_to_speech.py
+++ b/metagpt/learn/text_to_speech.py
@@ -12,7 +12,8 @@ from metagpt.tools.azure_tts import oas3_azsure_tts
from metagpt.utils.common import initialize_environment
-def text_to_speech(text, lang="zh-CN", voice="zh-CN-XiaomoNeural", style="affectionate", role="Girl", subscription_key="", region=""):
+def text_to_speech(text, lang="zh-CN", voice="zh-CN-XiaomoNeural", style="affectionate", role="Girl",
+ subscription_key="", region=""):
"""Text to speech
For more details, check out:`https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=tts`
@@ -28,7 +29,7 @@ def text_to_speech(text, lang="zh-CN", voice="zh-CN-XiaomoNeural", style="affect
"""
initialize_environment()
if (os.environ.get("AZURE_TTS_SUBSCRIPTION_KEY") and os.environ.get("AZURE_TTS_REGION")) or \
- (subscription_key and region):
+ (subscription_key and region):
return oas3_azsure_tts(text, lang, voice, style, role, subscription_key, region)
raise EnvironmentError