chore(qwen3-asr): pass prompt as context to transcribe (#9301)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2026-04-10 08:45:59 +02:00
committed by GitHub
parent 9748a1cbc6
commit 3bb8b65d31

View File

@@ -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="")