mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Fix to switch text to speech model via API
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user