Skip to content

feat(voice): add setVoiceLanguage and language-switch template - #100

Merged
akirilyuk merged 3 commits into
mainfrom
feature/set-voice-language
Sep 27, 2026
Merged

akirilyuk merged 3 commits into
mainfrom
feature/set-voice-language

Conversation

@akirilyuk

Copy link
Copy Markdown
Contributor

Summary

  • setVoiceLanguage(sessionId, { language, voice?, stt? }) asks the runner to change the speaking voice. Detection does not do that by itself.
  • New product template language-switch calls it from onUserLanguage and speaks in the new language.
  • voice and stt are Sherpa catalog ids (de, en-lessac, en-small), not model paths.

Test plan

  • vitest run test/voice-language-control.test.ts test/templates.test.ts test/template-folders.test.ts
  • tsc --noEmit

Agent code switches the speaking voice after user_language. Detection
does not change TTS by itself.
The language-switch template changes the listening model with the speaking voice.
setVoiceLanguage takes scope and sttVendor or ttsVendor. The language-switch template switches Sherpa sides separately and accepts /stt and /tts chat commands.
@akirilyuk
akirilyuk merged commit aba1419 into main Sep 27, 2026
6 checks passed
@akirilyuk
akirilyuk deleted the feature/set-voice-language branch September 27, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant