From 6e48f4de842a608ec252ac8cd8618dce21113cc6 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Tue, 3 Jun 2025 17:52:36 -0700 Subject: [PATCH] Fix to switch text to speech model via API --- src/khoj/routers/api_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/khoj/routers/api_model.py b/src/khoj/routers/api_model.py index a071d090..9ae5a253 100644 --- a/src/khoj/routers/api_model.py +++ b/src/khoj/routers/api_model.py @@ -104,7 +104,7 @@ async def update_voice_model( subscribed = has_required_scope(request, ["premium"]) # Validate if model can be switched - voice_model = await VoiceModelOption.objects.filter(id=int(id)).afirst() + voice_model = await VoiceModelOption.objects.filter(model_id=id).afirst() if voice_model is None: return Response(status_code=404, content=json.dumps({"status": "error", "message": "Voice model not found"})) if not subscribed and voice_model.price_tier != PriceTier.FREE: