From 3bb8b65d31016177b29a8f66a0340e041a0ee7d3 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 10 Apr 2026 08:45:59 +0200 Subject: [PATCH] chore(qwen3-asr): pass prompt as context to transcribe (#9301) Signed-off-by: Ettore Di Giacinto --- backend/python/qwen-asr/backend.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/python/qwen-asr/backend.py b/backend/python/qwen-asr/backend.py index 556f0e97a..2d1940afc 100644 --- a/backend/python/qwen-asr/backend.py +++ b/backend/python/qwen-asr/backend.py @@ -147,7 +147,11 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): if request.language and request.language.strip(): language = request.language.strip() - results = self.model.transcribe(audio=audio_path, language=language) + context = "" + if request.prompt and request.prompt.strip(): + context = request.prompt.strip() + + results = self.model.transcribe(audio=audio_path, language=language, context=context) if not results: return backend_pb2.TranscriptResult(segments=[], text="")