Update desktop app to android app capabilities.
This commit is contained in:
+28
-15
@@ -137,29 +137,42 @@ def check_wake_model() -> Check:
|
||||
|
||||
|
||||
def check_stt() -> Check:
|
||||
if not config.DEEPGRAM_API_KEY:
|
||||
return Check("speech-to-text", FAIL, "no DEEPGRAM_API_KEY",
|
||||
"set it in .env — nothing you say can be transcribed without it")
|
||||
if config.STT_STREAMING and not _module("websocket"):
|
||||
return Check("speech-to-text", WARN, "streaming on, but websocket-client is missing",
|
||||
"pip install websocket-client — it falls back to one-shot uploads")
|
||||
mode = "streaming" if config.STT_STREAMING else "one-shot"
|
||||
return Check("speech-to-text", OK, f"Deepgram {config.DEEPGRAM_MODEL}, {mode}")
|
||||
"""STT is a websocket relay to the server (/desk/stt) — no local Deepgram
|
||||
account, but websocket-client is now load-bearing for transcription to
|
||||
work at all, not just the streaming optimisation (there's no separate
|
||||
REST fallback any more)."""
|
||||
if not config.is_configured():
|
||||
return Check("speech-to-text", FAIL, "no BOLT_SERVER_URL/DESK_API_KEY",
|
||||
"set them in .env — nothing you say can be transcribed without the server")
|
||||
if not _module("websocket"):
|
||||
return Check("speech-to-text", FAIL, "websocket-client is missing",
|
||||
"pip install -r requirements.txt — /desk/stt is a websocket relay "
|
||||
"with no REST fallback")
|
||||
mode = "streaming" if config.STT_STREAMING else "one-shot (still via the server relay)"
|
||||
return Check("speech-to-text", OK, f"server relay, {mode}")
|
||||
|
||||
|
||||
def check_tts() -> Check:
|
||||
if not (config.ELEVENLABS_API_KEY and config.ELEVENLABS_VOICE_ID):
|
||||
if _module("pyttsx3"):
|
||||
return Check("text-to-speech", WARN, "no ElevenLabs key/voice — offline voice only",
|
||||
"set ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID for the real voice")
|
||||
return Check("text-to-speech", FAIL, "no ElevenLabs config and no pyttsx3 fallback")
|
||||
return Check("text-to-speech", OK,
|
||||
f"ElevenLabs {config.ELEVENLABS_MODEL_ID}, voice …{config.ELEVENLABS_VOICE_ID[-6:]}")
|
||||
"""TTS is the server's /desk/tts — no local ElevenLabs account needed for
|
||||
the normal reply voice, just a voice id for it to request."""
|
||||
if config.is_configured() and config.ELEVENLABS_VOICE_ID:
|
||||
return Check("text-to-speech", OK,
|
||||
f"server relay, voice …{config.ELEVENLABS_VOICE_ID[-6:]}")
|
||||
if _module("pyttsx3"):
|
||||
return Check("text-to-speech", WARN, "server/voice not configured — offline voice only",
|
||||
"set BOLT_SERVER_URL/DESK_API_KEY and ELEVENLABS_VOICE_ID for the real voice")
|
||||
return Check("text-to-speech", FAIL, "no server/voice config and no pyttsx3 fallback",
|
||||
"set BOLT_SERVER_URL/DESK_API_KEY/ELEVENLABS_VOICE_ID, "
|
||||
"or pip install pyttsx3 for an offline voice")
|
||||
|
||||
|
||||
def check_dialogue() -> Check:
|
||||
if not config.DIALOGUE:
|
||||
return Check("multi-voice scenes", WARN, "disabled (DIALOGUE=false)")
|
||||
if not config.ELEVENLABS_API_KEY:
|
||||
return Check("multi-voice scenes", WARN, "no ELEVENLABS_API_KEY",
|
||||
"set it in .env — dialogue scenes are the one feature still calling "
|
||||
"ElevenLabs directly, since the server has no equivalent endpoint")
|
||||
from . import dialogue
|
||||
|
||||
cast = dialogue.parse_voice_map(config.DIALOGUE_VOICES)
|
||||
|
||||
Reference in New Issue
Block a user