par-cli-tts 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: par-cli-tts
3
- Version: 0.2.1
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,14 +68,18 @@ Description-Content-Type: text/markdown
68
68
  ![Arch x86-63 | ARM | AppleSilicon](https://img.shields.io/badge/arch-x86--64%20%7C%20ARM%20%7C%20AppleSilicon-blue)
69
69
 
70
70
  ![MIT License](https://img.shields.io/badge/license-MIT-green.svg)
71
- ![Version](https://img.shields.io/badge/version-0.2.1-green.svg)
71
+ ![Version](https://img.shields.io/badge/version-0.2.2-green.svg)
72
72
  ![Development Status](https://img.shields.io/badge/status-stable-green.svg)
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
  [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/probello3)
77
77
 
78
- ## 🆕 What's New
78
+ ## What's New
79
+
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
79
83
 
80
84
  ### v0.2.1
81
85
  - Updated dependencies
@@ -83,41 +87,41 @@ A powerful command-line text-to-speech tool supporting multiple TTS providers (E
83
87
 
84
88
  ### v0.2.0
85
89
 
86
- **✨ Major Update**: Configuration files, smarter caching, consistent error handling, and more!
90
+ **Major Update**: Configuration files, smarter caching, consistent error handling, and more!
87
91
 
88
92
  ### New Features
89
- - 📝 **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
90
- - 🔄 **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
91
- - **Consistent Error Handling** - Clear error messages with proper exit codes
92
- - 📥 **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
93
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
94
- - 👂 **Voice Preview** - Test voices with sample text before using
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
95
99
 
96
100
  ### Improvements
97
- - 🔒 **Enhanced Security** - API key sanitization in debug output
98
- - 🚀 **Memory Efficiency** - Stream audio directly to files without buffering
99
- - **Model Verification** - SHA256 checksum verification for downloads
100
- - 🎯 **Better CLI** - All options now have short versions for quick access
101
- - 💾 **Cache Management** - New commands for cache refresh and cleanup
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
102
106
 
103
107
  ## Features
104
108
 
105
- - 🎭 **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
106
- - 📝 **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
107
- - 📥 **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
108
- - 🎯 **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
109
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
110
- - 👂 **Voice Preview** - Test voices with sample text using `--preview-voice`
111
- - **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
112
- - 🔍 **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
113
- - 💾 **XDG-Compliant Storage** - Proper cache and data directory management across platforms
114
- - 🎨 **Rich Terminal Output** - Beautiful colored output with progress indicators
115
- - 🚀 **Memory Efficient** - Stream audio directly to files without memory buffering
116
- - 🔒 **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
117
- - **Consistent Error Handling** - Clear error messages with categorized exit codes
118
- - 🎚️ **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
119
- - 🛠️ **Debug Mode** - Comprehensive debugging with sanitized output
120
- - 📁 **Smart File Management** - Automatic cleanup or preservation of audio files
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
121
125
 
122
126
  ## Technology Stack
123
127
 
@@ -765,7 +769,7 @@ GitHub: [@paulrobello](https://github.com/paulrobello)
765
769
  ## Support
766
770
 
767
771
  If you find this tool useful, consider:
768
- - Starring the repository
769
- - 🐛 Reporting bugs or requesting features
770
- - 📖 Improving documentation
771
- - [Buying me a coffee](https://buymeacoffee.com/probello3)
772
+ - Starring the repository
773
+ - Reporting bugs or requesting features
774
+ - Improving documentation
775
+ - [Buying me a coffee](https://buymeacoffee.com/probello3)
@@ -5,14 +5,18 @@
5
5
  ![Arch x86-63 | ARM | AppleSilicon](https://img.shields.io/badge/arch-x86--64%20%7C%20ARM%20%7C%20AppleSilicon-blue)
6
6
 
7
7
  ![MIT License](https://img.shields.io/badge/license-MIT-green.svg)
8
- ![Version](https://img.shields.io/badge/version-0.2.1-green.svg)
8
+ ![Version](https://img.shields.io/badge/version-0.2.2-green.svg)
9
9
  ![Development Status](https://img.shields.io/badge/status-stable-green.svg)
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
  [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/probello3)
14
14
 
15
- ## 🆕 What's New
15
+ ## What's New
16
+
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
16
20
 
17
21
  ### v0.2.1
18
22
  - Updated dependencies
@@ -20,41 +24,41 @@ A powerful command-line text-to-speech tool supporting multiple TTS providers (E
20
24
 
21
25
  ### v0.2.0
22
26
 
23
- **✨ Major Update**: Configuration files, smarter caching, consistent error handling, and more!
27
+ **Major Update**: Configuration files, smarter caching, consistent error handling, and more!
24
28
 
25
29
  ### New Features
26
- - 📝 **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
27
- - 🔄 **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
28
- - **Consistent Error Handling** - Clear error messages with proper exit codes
29
- - 📥 **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
30
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
31
- - 👂 **Voice Preview** - Test voices with sample text before using
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
32
36
 
33
37
  ### Improvements
34
- - 🔒 **Enhanced Security** - API key sanitization in debug output
35
- - 🚀 **Memory Efficiency** - Stream audio directly to files without buffering
36
- - **Model Verification** - SHA256 checksum verification for downloads
37
- - 🎯 **Better CLI** - All options now have short versions for quick access
38
- - 💾 **Cache Management** - New commands for cache refresh and cleanup
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
39
43
 
40
44
  ## Features
41
45
 
42
- - 🎭 **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
43
- - 📝 **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
44
- - 📥 **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
45
- - 🎯 **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
46
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
47
- - 👂 **Voice Preview** - Test voices with sample text using `--preview-voice`
48
- - **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
49
- - 🔍 **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
50
- - 💾 **XDG-Compliant Storage** - Proper cache and data directory management across platforms
51
- - 🎨 **Rich Terminal Output** - Beautiful colored output with progress indicators
52
- - 🚀 **Memory Efficient** - Stream audio directly to files without memory buffering
53
- - 🔒 **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
54
- - **Consistent Error Handling** - Clear error messages with categorized exit codes
55
- - 🎚️ **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
56
- - 🛠️ **Debug Mode** - Comprehensive debugging with sanitized output
57
- - 📁 **Smart File Management** - Automatic cleanup or preservation of audio files
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
58
62
 
59
63
  ## Technology Stack
60
64
 
@@ -702,7 +706,7 @@ GitHub: [@paulrobello](https://github.com/paulrobello)
702
706
  ## Support
703
707
 
704
708
  If you find this tool useful, consider:
705
- - Starring the repository
706
- - 🐛 Reporting bugs or requesting features
707
- - 📖 Improving documentation
708
- - [Buying me a coffee](https://buymeacoffee.com/probello3)
709
+ - Starring the repository
710
+ - Reporting bugs or requesting features
711
+ - Improving documentation
712
+ - [Buying me a coffee](https://buymeacoffee.com/probello3)
@@ -1,3 +1,3 @@
1
1
  """PAR CLI TTS - Command line text-to-speech tool."""
2
2
 
3
- __version__ = "0.2.1"
3
+ __version__ = "0.2.2"
@@ -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
- self.client = ElevenLabs(api_key=api_key, timeout=kwargs.get("timeout", 10.0))
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
- self.client = OpenAI(api_key=api_key, timeout=kwargs.get("timeout", 10.0))
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