Skip to content

feat(tts): on-device neural voice — WAV/MP3 download + pauses - #273

Merged
slaveofcode merged 1 commit into
developfrom
feat/tts-neural-download
Aug 17, 2026
Merged

feat(tts): on-device neural voice — WAV/MP3 download + pauses#273
slaveofcode merged 1 commit into
developfrom
feat/tts-neural-download

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Adds downloadable audio and pauses to Text-to-Speech, requested by a user.

Why: the browser/OS voices (Web Speech) genuinely can't be captured to a file. So this adds an on-device neural voice (MMS-TTS via @huggingface/transformers, loaded through the same /hf proxy as Whisper) that produces real audio samples.

New in the tool (OS-voice playback unchanged):

  • Download as WAV or MP3 (MP3 via @breezystack/lamejs).
  • Pauses: type [pause] (or leave a blank line) and set a pause length — silence is spliced into the audio buffer.
  • Multilingual AI voice (English, Indonesian, Spanish, French, German, Portuguese, Russian, Arabic, Hindi); model downloads once (~30–60 MB) and is cached offline.

Pure tts-audio.lib.ts (WAV encode, PCM16, silence concat, pause-split) unit-tested (7 tests). transformers + lamejs are lazy-loaded chunks (no impact on the initial page). EN + ID FAQ updated.

Verify: 1365 tests green, lint 0 errors, build OK.

Browser (OS) voices can't be recorded, so this adds an on-device neural
TTS (MMS-TTS via @huggingface/transformers, loaded through the same /hf
proxy as Whisper) that generates real audio samples. Users can play the
result, download WAV or MP3 (lamejs), and insert pauses with [pause]
markers or blank lines (silence spliced into the buffer). OS-voice
playback is unchanged. Pure tts-audio.lib.ts (WAV encode, PCM, silence,
pause-split) unit-tested. New dep: @breezystack/lamejs.
@slaveofcode
slaveofcode merged commit 400e190 into develop Aug 17, 2026
1 of 2 checks passed
@slaveofcode
slaveofcode deleted the feat/tts-neural-download branch August 17, 2026 23:37
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