Commit Graph

42 Commits

Author SHA1 Message Date
Xin Wang
3d6ef1833e feat: Enhance text-to-mic CLI and GUI with model selection and Edge-TTS support
This commit introduces significant improvements to the text-to-mic functionality, including:

- Added command-line argument parsing for better user interaction.
- Support for Edge-TTS, allowing audio generation without an API key.
- Dynamic model and voice selection based on user input and environment variables.
- Improved error handling and user feedback for audio device selection.
- Updated default voice settings based on selected TTS model.
- Removed unused compiled Python files from the repository.

Changes:
- text-to-mic-cli.py: Implemented argument parsing and client initialization logic.
- utils/text_to_mic.py: Integrated Edge-TTS audio generation and updated voice selection logic.
- Cleaned up unnecessary compiled files in the utils/__pycache__ directory.

This update enhances usability and flexibility for users leveraging different TTS models.
2026-06-18 13:55:03 +08:00
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
13de96fdad update version number 2025-03-25 10:09:13 +00:00
Andrew Ward
a529835037 address bugs around api key and non api key app modes, also refresh app on key input. Grey out buttons and add warnings for disabled features 2025-03-25 10:06:39 +00:00
Andrew Ward
aa092a3c15 update to add system voices and enable basic app use without an API key 2025-03-25 09:44:32 +00:00
Andrew Ward
86de047170 version 1.4.0 2025-03-22 12:43:31 +00:00
Andrew Ward
e69e45343e fix main ui select box layout and area sizing 2025-03-22 12:30:06 +00:00
Andrew Ward
a2a7c6f9a5 lots of ux improvements and small bug fixes 2025-03-22 12:18:40 +00:00
Andrew Ward
0e3cb8925a add check for updates banner 2025-03-22 11:47:57 +00:00
Andrew Ward
7633788da6 version checking nearly working 2025-03-22 11:27:22 +00:00
Andrew Ward
6054bd378f further code tidyup 2025-03-22 11:06:07 +00:00
Andrew Ward
900e2b9ef7 refactor settings handling to its own class 2025-03-22 11:01:33 +00:00
Andrew Ward
0f53b782b0 refactor code to move ai editing settings to its own file 2025-03-22 10:57:13 +00:00
Andrew Ward
039b9ee90d improvements to AI copyediting ux 2025-03-22 10:50:16 +00:00
Andrew Ward
41d69f9f95 make the app remember the last selected input and playback devices 2025-03-22 10:23:52 +00:00
Andrew Ward
8d0431ca20 make setting loading more robust so the app wont crash if new ones are added between releases 2025-03-22 10:22:29 +00:00
Andrew Ward
ed9e89f6c9 fix licence file loading 2025-03-22 10:19:16 +00:00
Andrew Ward
469826056c update icon, app head text, and versioning 2025-03-22 10:17:31 +00:00
Andrew Ward
bc130badc6 tidy up the design of the tone preset manager 2025-03-22 10:05:21 +00:00
Andrew Ward
758a804612 update version 2025-03-21 19:36:33 +00:00
Andrew Ward
62e6db331b add ability to easily stop a record and play process mid way through 2025-03-21 19:30:08 +00:00
Andrew Ward
e6b8973685 add cancel operation keyboard shortcut 2025-03-21 19:19:31 +00:00
Andrew Ward
450a58a7d8 implement banner showing and hiding 2025-03-21 19:12:17 +00:00
Andrew Ward
e2bf3f3f91 update presets area to scale to fit scaled window sizes 2025-03-21 18:29:43 +00:00
Andrew Ward
170199c604 update presets performance and refactor class, plus change more icons 2025-03-21 18:18:34 +00:00
Andrew Ward
704b6269bc add additional voices and deep preset 2025-03-21 17:54:11 +00:00
Andrew Ward
950a9b71cf further improve ui and cta 2025-03-21 13:20:32 +00:00
Andrew Ward
8a5f92b3cd add new interface for setting keyboard shortcuts 2025-03-21 12:49:05 +00:00
Andrew Ward
ece9d883cf hotkey manager working 2025-03-21 12:37:14 +00:00
Andrew Ward
1f476f2c60 update transcription model from whisper to gpt-4o-transcribe 2025-03-21 11:16:24 +00:00
Andrew Ward
651a09d496 improve style of the tone manager 2025-03-21 11:13:16 +00:00
Andrew Ward
b42b267141 update to enable tone of voice playback 2025-03-21 11:09:42 +00:00
Andrew Ward
c353e79b6a update button style 2025-03-21 10:31:25 +00:00
Andrew Ward
d95382e4b3 update ui 2025-03-21 10:21:06 +00:00
Andrew Ward
d365fc43e6 remove clam yellowy bg colour 2025-03-21 10:14:23 +00:00
Andrew Ward
794c71088a refactor code into smaller subclasses 2025-02-25 14:25:33 +00:00
Andrew Ward
1aa99026b0 remove wav restriction 2024-11-12 11:17:42 +00:00
Andrew Ward
f5a9363ff7 move presets example json to assets to prevent comiled code running issues 2024-10-29 11:09:54 +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
4280469c52 update presets more 2024-10-28 16:35:04 +00:00
Andrew Ward
3429e51c08 add presets area, working but some refinement needed 2024-10-28 16:02:28 +00:00
Andrew Ward
c407afac5b Update licence terms and loading into app 2024-09-05 10:28:23 +01:00