Commit graph

29 commits

Author SHA1 Message Date
603a211f47 Add /v1/models endpoint for voice discovery
- Implemented GET /v1/models endpoint
- Returns list of all TTS models with metadata
- Includes voice lists for each model
- Provides engine-specific information (sample rate, description)
- Enables frontend voice discovery and model type mapping

Response format:
{
  "object": "list",
  "data": [
    {
      "id": "tts-1",
      "engine": "piper",
      "description": "Fast neural TTS with 100+ voices",
      "sample_rate": 22050,
      "voices": [...],
      "voice_count": 40
    },
    ...
  ]
}

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 13:51:59 -05:00
d48fa6b29c Integrate Kokoro TTS as tts-1-kokoro model
- Added kokoro>=0.9.2 and soundfile to requirements.txt
- Created kokoro_wrapper class for 24kHz decoder-only TTS
- Added tts-1-kokoro endpoint with full voice mapping
- Mapped 32 Kokoro voices (11 female American, 9 male American, 4 female British, 4 male British, 4 Spanish, etc.)
- Added OpenAI-compatible aliases (alloy, echo, fable, onyx, nova, shimmer)
- Lightweight 82M parameter model, Apache licensed

Voices:
- American English (lang_code 'a'): 20 voices
- British English (lang_code 'b'): 8 voices
- Supports 9 languages total (a, b, e, f, h, i, j, p, z)

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 13:38:42 -05:00
20241632ea Fix Silero multilingual support with proper model loading
- Fixed Silero model caching to track language+speaker combination
- Updated Russian voices to use ru_v3 model (was v4_ru)
- Updated Spanish voices to use v3_es model (was v1_es)
- All model loading now properly switches between languages

Status:
 English (v3_en) - 119 voices working
 German (v3_de) - 6 voices working
 French (v3_fr) - 7 voices working
⚠️  Russian (ru_v3) - Model loading issue (investigating speaker format)
⚠️  Spanish (v3_es) - Model loading issue (investigating speaker format)

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 13:29:52 -05:00
01e51b08b5 🦝 Raccoon Mission: Silero TTS integration complete with 140 voices
 Integrated Silero TTS as tts-1-silero model
- Fixed omegaconf dependency
- Fixed Silero API integration (torch.hub.load returns 2 values)
- Fixed model.to(device) returning None bug
- Mapped all 140 Silero voices across 5 languages:
  * English (en): 118 speakers (en_0 to en_117) + random
  * Russian (ru): 5 speakers (aidar, baya, kseniya, xenia, eugene) + random
  * German (de): 5 speakers (bernd_ungerer, eva_k, friedrich, hokuspokus, karlsson) + random
  * Spanish (es): 3 speakers (es_0, es_1, es_2) + random
  * French (fr): 6 speakers (fr_0 to fr_5) + random

📝 Configuration changes:
- requirements.txt: Added omegaconf for Silero
- voice_to_speaker.default.yaml: All 140 Silero voices mapped
- speech.py: Silero wrapper class with proper API handling

🎯 Working TTS engines: 3
- Piper TTS (tts-1) - Fast, lightweight
- XTTS v2 (tts-1-hd) - High quality, voice cloning
- Silero TTS (tts-1-silero) - CPU-friendly, 5 languages, actively maintained

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 12:39:12 -05:00
4deedb9539 Fix syntax error in speech.py and document Chatterbox dependency conflict
- Fixed f-string syntax error in speech.py line 112 (unmatched parenthesis)
- Documented Chatterbox dependency conflict with Coqui TTS
- gradio 5.44.1 (Chatterbox) requires typer<1.0 and >=0.12
- spacy 3.6.x (Coqui TTS) requires typer<0.10.0 and >=0.3.0
- Commented out Chatterbox until conflict is resolved

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 10:49:34 -05:00
Claude
848c2c6cb5 Integrate Silero TTS and add infrastructure for Chatterbox/Kokoro
INTEGRATED: Silero TTS (tts-1-silero)
- Added silero_wrapper class to speech.py for PyTorch Hub integration
- CPU-friendly, no GPU required (48kHz sample rate)
- Supports 5 languages: English (117 speakers), Russian, German, Spanish, French
- Loads on-demand via torch.hub from snakers4/silero-models
- Added 6 OpenAI-compatible voice mappings (alloy, echo, fable, etc.)

PREPARED: Chatterbox & Kokoro TTS
- Added dependencies to requirements.txt:
  * git+https://github.com/resemble-ai/chatterbox.git
  * transformers>=4.35.0 (for Kokoro)
  * huggingface-hub[cli] (for model downloads)
- Created Makefile targets for downloading models
- Created test targets for all three new engines

Makefile Enhancements:
- make voices-silero: Download Silero models (en, ru, de, es, fr)
- make test-silero: Test Silero TTS endpoint
- make voices-chatterbox: Download Chatterbox models via HF CLI
- make test-chatterbox: Test Chatterbox with emotion control
- make voices-kokoro: Download Kokoro models via HF CLI
- make test-kokoro: Test Kokoro fast synthesis

speech.py Changes:
- Added silero_wrapper class with tts() method
- Added tts-1-silero model handler in generate_speech()
- Registered tts-1-silero model in app
- Added PCM media type for Silero (48000 Hz)
- Global state: silero_model, silero_speakers dict

Configuration:
- Updated voice_to_speaker.default.yaml with tts-1-silero section
- Mapped all 6 OpenAI voices to Silero speakers (en_0 through en_5)

Documentation:
- Updated docs/MODELS.md: Silero marked as  INTEGRATED
- Updated roadmap: Phase 1 task 3 completed
- Updated status footer: 3 models rescued
- Added integration examples and Makefile commands

Next Steps:
- Test Silero integration in Docker
- Implement Chatterbox emotion control engine
- Implement Kokoro fast decoder engine
2025-11-09 10:48:44 -05:00
2c6c1ad577 Add XTTS support to Makefile and create CLAUDE.md guide
Makefile improvements:
- Add voices-xtts target to download speaker samples
- Add test-xtts target for testing HD model
- Split voices into voices-piper and voices-xtts
- Update help text with all new targets

speech.py:
- Fix threading import scope issue for XTTS
- Remove redundant 'import threading' inside Piper block

docs/CLAUDE.md:
- Complete guide for Claude Code contributors
- Makefile-first development philosophy
- Never create dirs manually, always use Makefile
- Documentation requirements and testing philosophy
- Common mistakes to avoid
- Raccoon mission values and principles

This ensures consistent, repeatable deployments and makes it easy
to add new TTS engines following the same pattern.

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 09:52:13 -05:00
4aebcc037f Rebrand project to UncloseAI Speech
Renamed all references from openedai-speech to uncloseai-speech across
the entire codebase, including:
- Project name in README and documentation
- Docker image names in compose files
- Makefile deployment paths and container names
- Configuration examples in vars.sh.example

This establishes our raccoon mission fork as UncloseAI Speech, a unified
TTS system supporting multiple engines (Piper, XTTS, etc.) with OpenAI
API compatibility.

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 09:11:09 -05:00
eb899deca2 Fix Piper TTS absolute path resolution and improve deployment workflow
This commit resolves the "download entire voices" issue by properly handling
absolute paths in Piper model configuration and improves the deployment system.

Key changes:
- speech.py: Detect absolute paths and omit --data-dir/--download-dir flags
  when using absolute model paths, allowing Piper to load models directly
- speech.py: Add debug logging and stderr capture for Piper subprocess
- voice_to_speaker.default.yaml: Use absolute paths for all Piper models
- Makefile: Load deployment config from vars.sh for better security
- Makefile: Change restart to rebuild container ensuring code updates apply
- Add vars.sh.example template for deployment configuration
- .gitignore: Add vars.sh to prevent committing deployment secrets

Tested successfully with en_US-libritts_r-medium model using absolute path:
/app/voices/en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx

🦝 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 09:05:13 -05:00
matatonic
e815ef2860 0.18.0 - Allow multiple samples in xtts. Closes: #38 2024-08-15 17:19:34 -04:00
matatonic
c51355ca38 Fixes #35, detect configured sample rates for piper 2024-08-14 21:25:57 -04:00
matatonic
43dbf431f8 unbreak -min 2024-07-01 20:38:44 -04:00
matatonic
fdd443b10f 0.17.1 2024-07-01 19:43:32 -04:00
book3
be02887ad9 using landetect to automatically set the language of the request in xtts
inference
2024-07-01 12:33:27 -03:00
matatonic
1d144a12e0 0.16.0 +Multi-client safe 2024-06-29 13:03:30 -04:00
matatonic
703dec32b1 0.15.2 Thread safe version 15 2024-06-28 16:09:48 -04:00
matatonic
964b23a21c 0.15.1 +Fixes #24, no deepspeed by default, you're on your own for now 2024-06-27 10:23:58 -04:00
matatonic
be759f3fea 0.15.0 2024-06-27 01:43:43 -04:00
matatonic
c957ad86fc 0.14.1 +deepspeed (not in prebuilt docker) 2024-06-27 00:47:56 -04:00
matatonic
ae6a384e75 0.14.0 +streaming, +pcm, +wav, +temp, top_p, etc. 2024-06-26 20:54:24 -04:00
matatonic
34bf525c89 0.13.0 final 2024-06-25 17:20:28 -04:00
matatonic
72c7b799b9 xtts: +AMD gpu ROCm, +Apple MPS 2024-06-24 20:35:07 -04:00
matatonic
ea4af74e5c 0.13.0 -parler, +arm64, +audio_reader 2024-06-23 12:52:03 -04:00
matatonic
f21ed56a00 0.12.0 - Improved errors & logging, swap alloy default voice
closes #3, re: #11
2024-06-16 23:35:11 -04:00
matatonic
2fcb7cef0f 0.11.0 - Multilingual, new startup & dockerfiles, Fixes: #5, #6, #8, #9 2024-05-29 17:01:11 -04:00
matatonic
6864cf03b1 0.10.0 2024-04-26 20:42:33 -04:00
matatonic
a2a3d2b3eb 0.9.0 + fix xtts not None 2024-04-23 22:35:03 -04:00
matatonic
4d76aca1af 0.9.0 2024-04-23 22:07:23 -04:00
matatonic
98d1968af6 prebuilt docker, cleanup and docs. 2024-03-23 14:52:51 -04:00
Renamed from main.py (Browse further)