Commit Graph

20 Commits

Author SHA1 Message Date
Xin Wang
92d20e59e9 feat: Add SiliconFlow TTS API support with custom base URL and model selection
This commit adds comprehensive support for using SiliconFlow's TTS API as an alternative to OpenAI, including:

Features:
- Configurable API base URL (Settings > API Base URL)
- TTS model selection dropdown (CosyVoice2-0.5B, OpenAI compatible models)
- Dynamic voice options based on selected model
- Editable voice dropdown (Combobox) supporting custom voice IDs
- Automatic voice formatting for SiliconFlow (model:voice format)
- Debug logging for troubleshooting API calls
- Warning for incorrect base URL format

Changes:
- utils/settings_manager.py: Added api_base_url and tts_model settings
- utils/text_to_mic.py:
  - Added get_available_tts_models() for model options
  - Added get_siliconflow_voices() for SiliconFlow voices
  - Added change_api_base_url() method with validation
  - Added TTS model dropdown in GUI
  - Converted voice dropdown to Combobox for typing support
  - Added on_voice_exit() for validation
  - Updated API call to use selected model and formatted voice
- text-to-mic-cli.py: Added OPENAI_API_BASE_URL and OPENAI_TTS_MODEL env var support
- Readme.md: Updated documentation with SiliconFlow usage instructions

Supported Models:
- FunAudioLLM/CosyVoice2-0.5B (SiliconFlow - multi-language, emotional)
- tts-1, tts-1-hd (OpenAI compatible)
- gpt-4o-mini-tts (OpenAI default)

SiliconFlow Voices (CosyVoice2-0.5B):
- Male: alex, benjamin, charles, david
- Female: anna, bella, claire, diana
- Custom voices via voice ID entry

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 17:12:34 +08:00
Andrew Ward
2ed693edd8 readme new line 2025-03-22 12:53:58 +00:00
Andrew Ward
dac0e8ce0e add screenshots and update readme 2025-03-22 12:53:22 +00:00
Andrew Ward
4bc5a38854 update readme screenshot 2025-03-21 19:46:23 +00:00
Andrew Ward
5550d6c3fe update readme 2024-10-29 11:15:08 +00:00
Andrew Ward
f4ae2a9e39 fix some ui issues, add scrolling to presets area, update readme instructions, other small QOL improvements 2024-10-29 10:54:57 +00:00
Andrew Ward
6670c216d2 update readme 2024-09-05 10:34:11 +01:00
Andrew Ward
c407afac5b Update licence terms and loading into app 2024-09-05 10:28:23 +01:00
Andrew Ward
3843a93c09 fix windows hotkey performance 2024-05-05 18:19:50 +01:00
Andrew Ward
960fd8c572 add hotkey support 2024-05-05 17:40:21 +01:00
Luke Smith
f2f916b867 chore: updated readme with mac install steps 2024-05-03 15:08:51 +01:00
Andrew Ward
2437530e46 update readme 2024-05-01 18:00:17 +01:00
Andrew Ward
5d2e4f9776 add image to readme 2024-05-01 17:39:00 +01:00
Andrew Ward
df24ac297f update readme with more instructions 2024-05-01 17:33:31 +01:00
Andrew Ward
1dc15bc3b0 Create a basic GUI 2024-05-01 16:23:54 +01:00
Andrew Ward
862d73d96b update readme 2024-05-01 15:14:41 +01:00
Andrew Ward
13cbf1b4eb Working python version that streams to two different audio streams at the same time 2024-05-01 14:50:04 +01:00
Andrew Ward
b0f142d655 switched to sound device 2024-05-01 12:53:38 +01:00
Andrew Ward
3a130206df selecting audio device but not steaming successfully yet 2024-05-01 12:33:57 +01:00
Andrew Ward
e1ea803eb6 setup git ignore to ignore the .env file 2024-05-01 12:22:31 +01:00