Skip to content

Commit 07a7712

Browse files
author
wangyue.demon
committed
fix(tts): enhance error message and clarify docstring
1 parent 9813905 commit 07a7712

File tree

1 file changed

+4
-4
lines changed
  • veadk/tools/builtin_tools

1 file changed

+4
-4
lines changed

veadk/tools/builtin_tools/tts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@
4949
def text_to_speech(text: str, tool_context: ToolContext) -> Dict[str, Any]:
5050
"""TTS provides users with the ability to convert text to speech, turning the text content of LLM into audio.
5151
Use this tool when you need to convert text content into audible speech.
52-
It transforms plain text into natural-sounding speech, and supports customizations including voice timbre
53-
selection (e.g., male/female/neutral), speech speed and volume adjustment, as well as exporting the generated
54-
audio in common formats (e.g., MP3, WAV).
52+
It transforms plain text into natural-sounding speech, as well as exporting the generated audio in pcm format.
5553
5654
Args:
5755
text: The text to convert.
@@ -122,7 +120,9 @@ def text_to_speech(text: str, tool_context: ToolContext) -> Dict[str, Any]:
122120
except Exception as e:
123121
logger.error(f"Failed to convert text to speech: {e}")
124122
return {
125-
"error": (f"Tool text_to_speech execution failed. Execution Error: {e}")
123+
"error": f"Tool text_to_speech execution failed. "
124+
f"Response content: {response}"
125+
f"Execution Error: {e}"
126126
}
127127
finally:
128128
if audio_save_path and os.path.exists(audio_save_path):

0 commit comments

Comments
 (0)