Skip to content

Commit

Permalink
chore: add support to pass definition for stt
Browse files Browse the repository at this point in the history
  • Loading branch information
ymshenyu committed Dec 11, 2024
1 parent ed1f849 commit 15783b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/core/tools/provider/builtin/azurespeech/tools/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ def _invoke(self, user_id: str, tool_parameters: dict[str, Any]) -> list[ToolInv
if len(combinedPhrases) == 0:
raise Exception("No text detected, error: {}".format(json.dumps(data)))

return [self.create_text_message(data.get("combinedPhrases", [])[0].get("text", ""))]
return [
self.create_text_message(data.get("combinedPhrases", [])[0].get("text", "")),
self.create_json_message(data),
]
11 changes: 11 additions & 0 deletions api/core/tools/provider/builtin/azurespeech/tools/asr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,14 @@ parameters:
zh_Hans: 要转换的音频文件。
llm_description: The audio file to be converted.
form: llm
- name: definition
type: string
required: false
label:
en_US: Definition
zh_Hans: asr 详细配置
human_description:
en_US: Definition
zh_Hans: asr 详细配置
llm_description: Definition
form: form

0 comments on commit 15783b9

Please sign in to comment.