feat: streaming TTS generation and persistent voice library#166
Open
ice-product96 wants to merge 3 commits into
Open
feat: streaming TTS generation and persistent voice library#166ice-product96 wants to merge 3 commits into
ice-product96 wants to merge 3 commits into
Conversation
- Add `VoiceLibrary` class (omnivoice/utils/voice_library.py):
pre-clone a voice once, save it by name to disk (~/.omnivoice/voices/),
and reuse instantly without re-uploading reference audio.
- Add `OmniVoice.generate_streaming()` method:
generator that yields (audio_1d, status) tuples as each chunk is
decoded, enabling progressive playback in the UI for long texts.
Short texts still complete in a single pass.
- Rewrite Gradio demo (omnivoice/cli/demo.py) with three tabs:
* Voice Clone — saved-voice dropdown, streaming output, quick-save panel.
* Voice Design — unchanged.
* Voice Library — clone & name any audio, manage (list/delete) saved
voices; changes propagate live to all dropdowns.
- Export `VoiceClonePrompt` and `VoiceLibrary` from omnivoice/__init__.py.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New package omnivoice/api/server.py:
- GET /health, /info — system status & model info
- GET /voices — list all saved voice clones
- GET /voices/{name} — get single voice metadata
- POST /voices/clone — clone voice from uploaded audio
- DELETE /voices/{name} — delete a voice
- PATCH /voices/{name} — rename a voice
- POST /generate — sync TTS → complete WAV file
- POST /generate/stream — chunked streaming (PCM frames)
- WS /ws/generate — WebSocket real-time streaming
- Interactive docs at /docs (Swagger UI)
- Optional X-Api-Key auth, CORS, single GPU lock
Add omnivoice-api CLI entry point and [api] optional deps group.
Add API_INTEGRATION.md with full usage guide.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers all endpoints with parameters, response formats, binary framing protocol, JS/Python client examples and Docker setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
VoiceLibraryclass (omnivoice/utils/voice_library.py): pre-clone a voice once, save it by name to disk (~/.omnivoice/voices/), and reuse instantly without re-uploading reference audio.Add
OmniVoice.generate_streaming()method: generator that yields (audio_1d, status) tuples as each chunk is decoded, enabling progressive playback in the UI for long texts. Short texts still complete in a single pass.Rewrite Gradio demo (omnivoice/cli/demo.py) with three tabs:
Export
VoiceClonePromptandVoiceLibraryfrom omnivoice/init.py.