🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: merge oas3
莘权 马c4003e434d5a
diff --cc requirements.txtindex 72021b8e7,eef7464ce..81696250c--- a/requirements.txt+++ b/requirements.txt@@@ -35,7 -35,7 +35,8 @@@ tqdm==4.64.anthropic==0.3.6typing-inspect==0.8.0typing_extensions==4.5.0+aiofileslibcst==1.0.1qdrant-client==1.4.0-+ connexion[swagger-ui]-aiohttp_jinja2++aiohttp_jinja2diff --cc tests/metagpt/tools/test_azure_tts.pyindex 2145f7133,667e32d01..49dd7eed1--- a/tests/metagpt/tools/test_azure_tts.py+++ b/tests/metagpt/tools/test_azure_tts.py@@@ -4,34 -4,23 +4,42 @@@@Time : 2023/7/1 22:50@Author : alexanderwu@File : test_azure_tts.py+@Modified By: mashenquan, 2023-8-9, add more text formatting options+ @Modified By: mashenquan, 2023-8-17, move to `tools` folder."""- from metagpt.actions.azure_tts import AzureTTS+ import sys+ from pathlib import Path++ sys.path.append(str(Path(__file__).resolve().parent.parent.parent.parent)) # fix-bug: No module named 'metagpt'+from metagpt.const import WORKSPACE_ROOT+ from metagpt.tools.azure_tts import AzureTTS++from metagpt.utils.common import initialize_environmentdef test_azure_tts():-- azure_tts = AzureTTS("azure_tts")- azure_tts.synthesize_speech(- "zh-CN",- "zh-CN-YunxiNeural",- "Boy",- "你好,我是卡卡",- "output.wav")++ initialize_environment()++++ azure_tts = AzureTTS()+ text = """+ 女儿看见父亲走了进来,问道:+ <mstts:express-as role="YoungAdultFemale" style="calm">+ “您来的挺快的,怎么过来的?”+ </mstts:express-as>+ 父亲放下手提包,说:+ <mstts:express-as role="OlderAdultMale" style="calm">+ “Writing a binary file in Python is similar to writing a regular text file, but you'll work with bytes instead of strings.”+ </mstts:express-as>+ """+ path = WORKSPACE_ROOT / "tts"+ path.mkdir(exist_ok=True, parents=True)+ filename = path / "girl.wav"+ result = azure_tts.synthesize_speech(- "zh-CN",- "zh-CN-XiaomoNeural",++ lang="zh-CN",++ voice="zh-CN-XiaomoNeural",+ text=text,+ output_file=str(filename))++ print(result)# 运行需要先配置 SUBSCRIPTION_KEY# TODO: 这里如果要检验,还要额外加上对应的asr,才能确保前后生成是接近一致的,但现在还没有