From 60a7320696ccef8dea4dd52b2de8a5026d64fa6f Mon Sep 17 00:00:00 2001 From: ymshenyu Date: Wed, 11 Dec 2024 18:40:11 +0800 Subject: [PATCH] chore: add support to pass definition for stt --- api/core/tools/provider/builtin/azurespeech/tools/asr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/provider/builtin/azurespeech/tools/asr.py b/api/core/tools/provider/builtin/azurespeech/tools/asr.py index a3b1a27a312f16..3f6cf2b34b005f 100644 --- a/api/core/tools/provider/builtin/azurespeech/tools/asr.py +++ b/api/core/tools/provider/builtin/azurespeech/tools/asr.py @@ -19,7 +19,7 @@ def _invoke(self, user_id: str, tool_parameters: dict[str, Any]) -> list[ToolInv files: dict = {"audio": audio_binary} if definition: - files["definition"] = definition + files["definition"] = '"{}"'.format(definition) resp = requests.post( "https://{}.api.cognitive.microsoft.com/speechtotext/transcriptions:transcribe?api-version={}".format( self.runtime.credentials.get("azure_speech_region"),