par-cli-tts 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/PKG-INFO +45 -35
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/README.md +44 -34
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/__init__.py +1 -1
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/model_downloader.py +11 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/providers/elevenlabs.py +4 -1
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/providers/openai.py +4 -1
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/.gitignore +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/LICENSE +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/pyproject.toml +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/config.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/config_file.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/errors.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/kokoro_cli.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/providers/__init__.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/providers/base.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/providers/kokoro_onnx.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/py.typed +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/tts_cli.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/utils.py +0 -0
- {par_cli_tts-0.2.0 → par_cli_tts-0.2.2}/src/voice_cache.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: par-cli-tts
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: PAR CLI TTS - Command line text-to-speech tool using ElevenLabs with voice caching and name resolution
|
|
5
5
|
Project-URL: Homepage, https://github.com/paulrobello/par-cli-tts
|
|
6
6
|
Project-URL: Documentation, https://github.com/paulrobello/par-cli-tts/blob/main/README.md
|
|
@@ -68,50 +68,60 @@ Description-Content-Type: text/markdown
|
|
|
68
68
|

|
|
69
69
|
|
|
70
70
|

|
|
71
|
-

|
|
72
72
|

|
|
73
73
|
|
|
74
74
|
A powerful command-line text-to-speech tool supporting multiple TTS providers (ElevenLabs, OpenAI, and Kokoro ONNX) with intelligent voice caching, name resolution, and flexible output options.
|
|
75
75
|
|
|
76
76
|
[](https://buymeacoffee.com/probello3)
|
|
77
77
|
|
|
78
|
-
##
|
|
78
|
+
## What's New
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
### v0.2.2
|
|
81
|
+
- Updated all HTTP requests and downloaders to ignore SSL certificate errors
|
|
82
|
+
- Improves compatibility with corporate proxies and development environments
|
|
83
|
+
|
|
84
|
+
### v0.2.1
|
|
85
|
+
- Updated dependencies
|
|
86
|
+
- Ensured Python 3.13 compatibility
|
|
87
|
+
|
|
88
|
+
### v0.2.0
|
|
89
|
+
|
|
90
|
+
**Major Update**: Configuration files, smarter caching, consistent error handling, and more!
|
|
81
91
|
|
|
82
92
|
### New Features
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
93
|
+
- **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
|
|
94
|
+
- **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
|
|
95
|
+
- **Consistent Error Handling** - Clear error messages with proper exit codes
|
|
96
|
+
- **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
|
|
97
|
+
- **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
|
|
98
|
+
- **Voice Preview** - Test voices with sample text before using
|
|
89
99
|
|
|
90
100
|
### Improvements
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
101
|
+
- **Enhanced Security** - API key sanitization in debug output
|
|
102
|
+
- **Memory Efficiency** - Stream audio directly to files without buffering
|
|
103
|
+
- **Model Verification** - SHA256 checksum verification for downloads
|
|
104
|
+
- **Better CLI** - All options now have short versions for quick access
|
|
105
|
+
- **Cache Management** - New commands for cache refresh and cleanup
|
|
96
106
|
|
|
97
107
|
## Features
|
|
98
108
|
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
109
|
+
- **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
|
|
110
|
+
- **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
|
|
111
|
+
- **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
|
|
112
|
+
- **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
|
|
113
|
+
- **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
|
|
114
|
+
- **Voice Preview** - Test voices with sample text using `--preview-voice`
|
|
115
|
+
- **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
|
|
116
|
+
- **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
|
|
117
|
+
- **XDG-Compliant Storage** - Proper cache and data directory management across platforms
|
|
118
|
+
- **Rich Terminal Output** - Beautiful colored output with progress indicators
|
|
119
|
+
- **Memory Efficient** - Stream audio directly to files without memory buffering
|
|
120
|
+
- **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
|
|
121
|
+
- **Consistent Error Handling** - Clear error messages with categorized exit codes
|
|
122
|
+
- **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
|
|
123
|
+
- **Debug Mode** - Comprehensive debugging with sanitized output
|
|
124
|
+
- **Smart File Management** - Automatic cleanup or preservation of audio files
|
|
115
125
|
|
|
116
126
|
## Technology Stack
|
|
117
127
|
|
|
@@ -759,7 +769,7 @@ GitHub: [@paulrobello](https://github.com/paulrobello)
|
|
|
759
769
|
## Support
|
|
760
770
|
|
|
761
771
|
If you find this tool useful, consider:
|
|
762
|
-
-
|
|
763
|
-
-
|
|
764
|
-
-
|
|
765
|
-
-
|
|
772
|
+
- Starring the repository
|
|
773
|
+
- Reporting bugs or requesting features
|
|
774
|
+
- Improving documentation
|
|
775
|
+
- [Buying me a coffee](https://buymeacoffee.com/probello3)
|
|
@@ -5,50 +5,60 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|

|
|
8
|
-

|
|
9
9
|

|
|
10
10
|
|
|
11
11
|
A powerful command-line text-to-speech tool supporting multiple TTS providers (ElevenLabs, OpenAI, and Kokoro ONNX) with intelligent voice caching, name resolution, and flexible output options.
|
|
12
12
|
|
|
13
13
|
[](https://buymeacoffee.com/probello3)
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## What's New
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
### v0.2.2
|
|
18
|
+
- Updated all HTTP requests and downloaders to ignore SSL certificate errors
|
|
19
|
+
- Improves compatibility with corporate proxies and development environments
|
|
20
|
+
|
|
21
|
+
### v0.2.1
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- Ensured Python 3.13 compatibility
|
|
24
|
+
|
|
25
|
+
### v0.2.0
|
|
26
|
+
|
|
27
|
+
**Major Update**: Configuration files, smarter caching, consistent error handling, and more!
|
|
18
28
|
|
|
19
29
|
### New Features
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
30
|
+
- **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
|
|
31
|
+
- **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
|
|
32
|
+
- **Consistent Error Handling** - Clear error messages with proper exit codes
|
|
33
|
+
- **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
|
|
34
|
+
- **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
|
|
35
|
+
- **Voice Preview** - Test voices with sample text before using
|
|
26
36
|
|
|
27
37
|
### Improvements
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
38
|
+
- **Enhanced Security** - API key sanitization in debug output
|
|
39
|
+
- **Memory Efficiency** - Stream audio directly to files without buffering
|
|
40
|
+
- **Model Verification** - SHA256 checksum verification for downloads
|
|
41
|
+
- **Better CLI** - All options now have short versions for quick access
|
|
42
|
+
- **Cache Management** - New commands for cache refresh and cleanup
|
|
33
43
|
|
|
34
44
|
## Features
|
|
35
45
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
46
|
+
- **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
|
|
47
|
+
- **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
|
|
48
|
+
- **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
|
|
49
|
+
- **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
|
|
50
|
+
- **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
|
|
51
|
+
- **Voice Preview** - Test voices with sample text using `--preview-voice`
|
|
52
|
+
- **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
|
|
53
|
+
- **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
|
|
54
|
+
- **XDG-Compliant Storage** - Proper cache and data directory management across platforms
|
|
55
|
+
- **Rich Terminal Output** - Beautiful colored output with progress indicators
|
|
56
|
+
- **Memory Efficient** - Stream audio directly to files without memory buffering
|
|
57
|
+
- **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
|
|
58
|
+
- **Consistent Error Handling** - Clear error messages with categorized exit codes
|
|
59
|
+
- **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
|
|
60
|
+
- **Debug Mode** - Comprehensive debugging with sanitized output
|
|
61
|
+
- **Smart File Management** - Automatic cleanup or preservation of audio files
|
|
52
62
|
|
|
53
63
|
## Technology Stack
|
|
54
64
|
|
|
@@ -696,7 +706,7 @@ GitHub: [@paulrobello](https://github.com/paulrobello)
|
|
|
696
706
|
## Support
|
|
697
707
|
|
|
698
708
|
If you find this tool useful, consider:
|
|
699
|
-
-
|
|
700
|
-
-
|
|
701
|
-
-
|
|
702
|
-
-
|
|
709
|
+
- Starring the repository
|
|
710
|
+
- Reporting bugs or requesting features
|
|
711
|
+
- Improving documentation
|
|
712
|
+
- [Buying me a coffee](https://buymeacoffee.com/probello3)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Model downloader for Kokoro ONNX TTS models."""
|
|
2
2
|
|
|
3
|
+
import ssl
|
|
3
4
|
import urllib.error
|
|
4
5
|
import urllib.request
|
|
5
6
|
from pathlib import Path
|
|
@@ -95,6 +96,16 @@ class ModelDownloader:
|
|
|
95
96
|
downloaded = block_num * block_size
|
|
96
97
|
progress.update(task, completed=min(downloaded, total_size))
|
|
97
98
|
|
|
99
|
+
# Create SSL context that doesn't verify certificates
|
|
100
|
+
ssl_context = ssl.create_default_context()
|
|
101
|
+
ssl_context.check_hostname = False
|
|
102
|
+
ssl_context.verify_mode = ssl.CERT_NONE
|
|
103
|
+
|
|
104
|
+
# Install opener with SSL verification disabled
|
|
105
|
+
https_handler = urllib.request.HTTPSHandler(context=ssl_context)
|
|
106
|
+
opener = urllib.request.build_opener(https_handler)
|
|
107
|
+
urllib.request.install_opener(opener)
|
|
108
|
+
|
|
98
109
|
# Download the file
|
|
99
110
|
urllib.request.urlretrieve(url, temp_path, reporthook=download_hook)
|
|
100
111
|
|
|
@@ -4,6 +4,7 @@ from collections.abc import Iterator
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any
|
|
6
6
|
|
|
7
|
+
import httpx
|
|
7
8
|
from elevenlabs import VoiceSettings, play, save
|
|
8
9
|
from elevenlabs.client import ElevenLabs
|
|
9
10
|
from rich.console import Console
|
|
@@ -26,7 +27,9 @@ class ElevenLabsProvider(TTSProvider):
|
|
|
26
27
|
**kwargs: Additional configuration.
|
|
27
28
|
"""
|
|
28
29
|
super().__init__(api_key, **kwargs)
|
|
29
|
-
|
|
30
|
+
# Create httpx client with SSL verification disabled
|
|
31
|
+
http_client = httpx.Client(verify=False, timeout=kwargs.get("timeout", 10.0))
|
|
32
|
+
self.client = ElevenLabs(api_key=api_key, httpx_client=http_client)
|
|
30
33
|
self.cache = VoiceCache(app_name="par-tts-elevenlabs")
|
|
31
34
|
|
|
32
35
|
@property
|
|
@@ -5,6 +5,7 @@ from collections.abc import Iterator
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Any, Literal
|
|
7
7
|
|
|
8
|
+
import httpx
|
|
8
9
|
from openai import OpenAI
|
|
9
10
|
from rich.console import Console
|
|
10
11
|
|
|
@@ -35,7 +36,9 @@ class OpenAIProvider(TTSProvider):
|
|
|
35
36
|
**kwargs: Additional configuration.
|
|
36
37
|
"""
|
|
37
38
|
super().__init__(api_key, **kwargs)
|
|
38
|
-
|
|
39
|
+
# Create httpx client with SSL verification disabled
|
|
40
|
+
http_client = httpx.Client(verify=False, timeout=kwargs.get("timeout", 10.0))
|
|
41
|
+
self.client = OpenAI(api_key=api_key, http_client=http_client)
|
|
39
42
|
|
|
40
43
|
@property
|
|
41
44
|
def name(self) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|