feat: lots of speech stuff

This commit is contained in:
Brooklyn Nicholson
2026-05-01 19:28:02 -05:00
parent 9f3d393a4d
commit d5d7b5c6dc
41 changed files with 1405 additions and 361 deletions
+7
View File
@@ -50,6 +50,13 @@ const ERROR_SUMMARIES: { test: (msg: string) => boolean; summarize: (msg: string
test: msg => /neither voice_tools_openai_key nor openai_api_key is set/i.test(msg),
summarize: () => 'OpenAI TTS needs VOICE_TOOLS_OPENAI_KEY or OPENAI_API_KEY.'
},
{
test: msg => /ELEVENLABS_API_KEY not set/i.test(msg) || /ElevenLabs STT API error \(HTTP 401\)/i.test(msg),
summarize: msg =>
/ELEVENLABS_API_KEY not set/i.test(msg)
? 'ElevenLabs STT needs ELEVENLABS_API_KEY.'
: 'ElevenLabs rejected the API key (401).'
},
{
test: msg => /method not allowed/i.test(msg),
summarize: () => 'The desktop backend does not support that audio endpoint yet. Restart Hermes Desktop.'
+22
View File
@@ -0,0 +1,22 @@
import { atom } from 'nanostores'
export type VoicePlaybackSource = 'read-aloud' | 'voice-conversation'
export type VoicePlaybackStatus = 'idle' | 'preparing' | 'speaking'
export interface VoicePlaybackState {
messageId: string | null
sequence: number
source: VoicePlaybackSource | null
status: VoicePlaybackStatus
}
export const $voicePlayback = atom<VoicePlaybackState>({
messageId: null,
sequence: 0,
source: null,
status: 'idle'
})
export function setVoicePlaybackState(next: VoicePlaybackState) {
$voicePlayback.set(next)
}