Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
fix(docs): fix bug in the tts tutorial (#1010)
DavdGao81490c883be2
diff --git a/README.md b/README.mdindex 85651b2c5..0cba7e0cc 100644--- a/README.md+++ b/README.md@@ -126,9 +126,9 @@ Quick overview of important features in **AgentScope 1.0**:Welcome to join our community on-| [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |-|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-| <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i1/O1CN01LxzZha1thpIN2cc2E_!!6000000005934-2-tps-497-477.png" width="100" height="100"> |+| [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |+|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|+| <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="./assets/images/dingtalk_qr_code.png" width="100" height="100"> |<!-- START doctoc generated TOC please keep comment here to allow auto update --><!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->@@ -390,6 +390,7 @@ as_studio- [Long-Term Memory](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/long_term_memory)- [Session with SQLite](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/session_with_sqlite)- [Stream Printing Messages](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/stream_printing_messages)+ - [TTS](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/tts)- Agent- [ReAct Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/react_agent)- [Voice Agent](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/voice_agent)diff --git a/README_zh.md b/README_zh.mdindex 352902eab..a144f808f 100644--- a/README_zh.md+++ b/README_zh.md@@ -126,9 +126,9 @@ AgentScope v1.0 新功能概览:欢迎加入我们的社区,获取最新的更新和支持!-| [Discord](https://discord.gg/eYMpfnkG8h) | 钉钉 |-|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-| <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i1/O1CN01LxzZha1thpIN2cc2E_!!6000000005934-2-tps-497-477.png" width="100" height="100"> |+| [Discord](https://discord.gg/eYMpfnkG8h) | 钉钉 |+|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|+| <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="./assets/images/dingtalk_qr_code.png" width="100" height="100"> |<!-- START doctoc generated TOC please keep comment here to allow auto update --><!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->@@ -391,6 +391,7 @@ as_studio- [长期记忆](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/long_term_memory)- [基于DB的会话管理](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/session_with_sqlite)- [流式获取打印消息](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/stream_printing_messages)+ - [TTS](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/tts)- 智能体- [ReAct 智能体](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/react_agent)- [语音智能体](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/voice_agent)diff --git a/assets/images/dingtalk_qr_code.png b/assets/images/dingtalk_qr_code.pngnew file mode 100644index 000000000..f96b1e6c5Binary files /dev/null and b/assets/images/dingtalk_qr_code.png differdiff --git a/docs/tutorial/en/src/task_tts.py b/docs/tutorial/en/src/task_tts.pyindex f692237d7..cdd909d82 100644--- a/docs/tutorial/en/src/task_tts.py+++ b/docs/tutorial/en/src/task_tts.py@@ -98,7 +98,7 @@ async def example_non_realtime_tts() -> None:# tts_response.content contains an audio block with base64-encoded audio dataprint("The length of audio data:",- len(tts_response.content[0]["source"]["data"]),+ len(tts_response.content["source"]["data"]),)@@ -133,7 +133,7 @@ async def example_non_realtime_tts_streaming() -> None:# Process each audio chunk as it arrivesprint("Received audio chunk of length:",- len(tts_response.content[0]["source"]["data"]),+ len(tts_response.content["source"]["data"]),)diff --git a/docs/tutorial/zh_CN/src/task_tts.py b/docs/tutorial/zh_CN/src/task_tts.pyindex 8dd4f2513..35c9eed93 100644--- a/docs/tutorial/zh_CN/src/task_tts.py+++ b/docs/tutorial/zh_CN/src/task_tts.py@@ -92,7 +92,7 @@ async def example_non_realtime_tts() -> None:tts_response = await tts_model.synthesize(msg)# tts_response.content 包含一个带有 base64 编码音频数据的音频块- print("音频数据长度:", len(tts_response.content[0]["source"]["data"]))+ print("音频数据长度:", len(tts_response.content["source"]["data"]))asyncio.run(example_non_realtime_tts())@@ -124,7 +124,7 @@ async def example_non_realtime_tts_streaming() -> None:# 合成并接收用于流式输出的异步生成器async for tts_response in await tts_model.synthesize(msg):# 处理到达的每个音频块- print("接收到的音频块长度:", len(tts_response.content[0]["source"]["data"]))+ print("接收到的音频块长度:", len(tts_response.content["source"]["data"]))asyncio.run(example_non_realtime_tts_streaming())diff --git a/src/agentscope/_version.py b/src/agentscope/_version.pyindex 8de699179..f551300c5 100644--- a/src/agentscope/_version.py+++ b/src/agentscope/_version.py@@ -1,4 +1,4 @@# -*- coding: utf-8 -*-"""The version of agentscope."""-__version__ = "1.0.9"+__version__ = "1.0.10dev"