Commit Graph
11 Commits
Author SHA1 Message Date
bedd1c4098 feat(voice/clone): support MP3 and other audio formats for reference voices (#20)
## Summary
- Adds support for MP3, FLAC, OGG, and other audio formats when
uploading reference voices for cloning
- Replace WAV-only `audio_read()` with a `soundfile`-based
implementation
- Update web UI file picker to accept multiple audio formats

## Changes
- `pocket_tts/data/audio.py`: Use `soundfile` library instead of
Python's `wave` module
- `pocket_tts/main.py`: Preserve original file extension in temp files
for format detection
- `pocket_tts/main.py`: Add missing `truncate=True` to CLI generate
command
- `pocket_tts/static/index.html`: Update file input to accept
`.wav,.mp3,.flac,.ogg,.m4a,audio/*`
- `pyproject.toml`: Add `soundfile>=0.12.0` dependency

## Tested
- [x] Upload a WAV file as reference voice and generate speech
- [x] Upload an MP3 file as reference voice and generate speech
- [x] Upload a FLAC file as reference voice and generate speech
- [x] Verify CLI `--voice` option works with MP3 files

---------

Co-authored-by: Gabriel de Marmiesse <gabrieldemarmiesse@gmail.com>
Co-authored-by: Václav Volhejn <8401624+vvolhejn@users.noreply.github.com>
2026-01-20 10:12:50 +01:00
Arihant Tripathy 8cadf71b0f Slice the kvcache when getting the model state for a given voice (#32)
Related to #14
2026-01-17 15:55:57 +01:00
Gabriel de Marmiesse c4960e6fd9 Add rules and some other misc notes (#35) 2026-01-15 21:27:58 +01:00
Gabriel de Marmiesse 46bb28f448 Pin the versions of the files we're using and allow offline use (#27)
Without a specific commit, huggingface cannot be sure that the file has
not changed, so it needs to do a quick query to hf hub to check that
there were no new commits. This adds some latency to the CLI and
function calls, but it also prevents offline use, even if the files are
already present locally. This PRs fixes this. Now with the commit hash,
hf has the guarantee that the local files are the right ones and thus
doesn't need to query the hub every time.

Fix https://github.com/kyutai-labs/pocket-tts/pull/21
2026-01-14 12:55:38 +01:00
Gabriel de Marmiesse 222714c495 Fix memory leak by using no_grad in all threads (#16)
`torch.no_grad` is thread local, I now run the autoregressive generation
in a separate thread, in addition of the thread running mimi, and forgot
to add `torch.no_grad` to the function inside this thread.
2026-01-13 18:07:02 +01:00
gabrieldemarmiesse 424674fa3d Fix html 2026-01-13 11:30:33 +01:00
Gabriel de Marmiesse 366aa68c23 Change voices available without voice cloning (#12) 2026-01-13 11:06:23 +01:00
Gabriel de Marmiesse 2ba3b64f52 Allow and handle infinitely long text inputs (#11)
Fix #5
2026-01-12 17:16:24 +01:00
Gabriel de Marmiesse aab9443122 Give priority to the wav upload in the html page (#9) 2026-01-12 15:02:14 +01:00
Gabriel de Marmiesse becd3137a1 Use the new checkpoints structure (#10) 2026-01-12 12:56:13 +01:00
gabrieldemarmiesse f5fa328a58 Copy the files in the new repo for public release 2026-01-12 11:25:16 +01:00