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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: par-cli-tts
3
- Version: 0.2.0
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
  ![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.0-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 in v0.2.0
78
+ ## What's New
79
79
 
80
- **✨ Major Update**: Configuration files, smarter caching, consistent error handling, and more!
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
- - 📝 **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
84
- - 🔄 **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
85
- - **Consistent Error Handling** - Clear error messages with proper exit codes
86
- - 📥 **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
87
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
88
- - 👂 **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
89
99
 
90
100
  ### Improvements
91
- - 🔒 **Enhanced Security** - API key sanitization in debug output
92
- - 🚀 **Memory Efficiency** - Stream audio directly to files without buffering
93
- - **Model Verification** - SHA256 checksum verification for downloads
94
- - 🎯 **Better CLI** - All options now have short versions for quick access
95
- - 💾 **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
96
106
 
97
107
  ## Features
98
108
 
99
- - 🎭 **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
100
- - 📝 **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
101
- - 📥 **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
102
- - 🎯 **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
103
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
104
- - 👂 **Voice Preview** - Test voices with sample text using `--preview-voice`
105
- - **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
106
- - 🔍 **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
107
- - 💾 **XDG-Compliant Storage** - Proper cache and data directory management across platforms
108
- - 🎨 **Rich Terminal Output** - Beautiful colored output with progress indicators
109
- - 🚀 **Memory Efficient** - Stream audio directly to files without memory buffering
110
- - 🔒 **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
111
- - **Consistent Error Handling** - Clear error messages with categorized exit codes
112
- - 🎚️ **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
113
- - 🛠️ **Debug Mode** - Comprehensive debugging with sanitized output
114
- - 📁 **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
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
- - Starring the repository
763
- - 🐛 Reporting bugs or requesting features
764
- - 📖 Improving documentation
765
- - [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,50 +5,60 @@
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.0-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 in v0.2.0
15
+ ## What's New
16
16
 
17
- **✨ Major Update**: Configuration files, smarter caching, consistent error handling, and more!
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
- - 📝 **Configuration File Support** - Set defaults in `~/.config/par-tts/config.yaml`
21
- - 🔄 **Smarter Voice Cache** - Change detection, manual refresh, and voice sample caching
22
- - **Consistent Error Handling** - Clear error messages with proper exit codes
23
- - 📥 **Multiple Input Methods** - Direct text, stdin piping, and file input (`@filename`)
24
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
25
- - 👂 **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
26
36
 
27
37
  ### Improvements
28
- - 🔒 **Enhanced Security** - API key sanitization in debug output
29
- - 🚀 **Memory Efficiency** - Stream audio directly to files without buffering
30
- - **Model Verification** - SHA256 checksum verification for downloads
31
- - 🎯 **Better CLI** - All options now have short versions for quick access
32
- - 💾 **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
33
43
 
34
44
  ## Features
35
45
 
36
- - 🎭 **Multiple TTS Providers** - Support for ElevenLabs, OpenAI, and Kokoro ONNX with easy provider switching
37
- - 📝 **Configuration File** - Set default preferences in YAML config file (`~/.config/par-tts/config.yaml`)
38
- - 📥 **Flexible Input Methods** - Accept text from command line, stdin pipe, or files (`@filename`)
39
- - 🎯 **Voice Name Support** - Use voice names like "Juniper" or "nova" instead of cryptic IDs
40
- - 🔊 **Volume Control** - Adjust playback volume (0.0 to 5.0) with platform-specific support
41
- - 👂 **Voice Preview** - Test voices with sample text using `--preview-voice`
42
- - **Smart Voice Caching** - Change detection, auto-refresh, and voice sample caching
43
- - 🔍 **Partial Name Matching** - Type "char" to match "Charlotte" (ElevenLabs)
44
- - 💾 **XDG-Compliant Storage** - Proper cache and data directory management across platforms
45
- - 🎨 **Rich Terminal Output** - Beautiful colored output with progress indicators
46
- - 🚀 **Memory Efficient** - Stream audio directly to files without memory buffering
47
- - 🔒 **Security First** - API keys sanitized in debug output, SHA256 verification for downloads
48
- - **Consistent Error Handling** - Clear error messages with categorized exit codes
49
- - 🎚️ **Provider-Specific Options** - Stability/similarity for ElevenLabs, speed/format for OpenAI
50
- - 🛠️ **Debug Mode** - Comprehensive debugging with sanitized output
51
- - 📁 **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
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
- - Starring the repository
700
- - 🐛 Reporting bugs or requesting features
701
- - 📖 Improving documentation
702
- - [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.0"
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