abstractvoice 0.3.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

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: abstractvoice
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: A modular Python library for voice interactions with AI systems
5
5
  Author-email: Laurent-Philippe Albou <contact@abstractcore.ai>
6
6
  License-Expression: MIT
@@ -29,7 +29,7 @@ Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "tts"
29
29
  Requires-Dist: torch<2.4.0,>=2.0.0; extra == "tts"
30
30
  Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "tts"
31
31
  Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "tts"
32
- Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "tts"
32
+ Requires-Dist: librosa>=0.10.0; extra == "tts"
33
33
  Provides-Extra: stt
34
34
  Requires-Dist: openai-whisper>=20230314; extra == "stt"
35
35
  Requires-Dist: tiktoken>=0.6.0; extra == "stt"
@@ -44,7 +44,7 @@ Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "all"
44
44
  Requires-Dist: torch<2.4.0,>=2.0.0; extra == "all"
45
45
  Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "all"
46
46
  Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "all"
47
- Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "all"
47
+ Requires-Dist: librosa>=0.10.0; extra == "all"
48
48
  Requires-Dist: soundfile>=0.12.1; extra == "all"
49
49
  Requires-Dist: flask>=2.0.0; extra == "all"
50
50
  Requires-Dist: tiktoken>=0.6.0; extra == "all"
@@ -61,7 +61,7 @@ Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "voice-full"
61
61
  Requires-Dist: torch<2.4.0,>=2.0.0; extra == "voice-full"
62
62
  Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "voice-full"
63
63
  Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "voice-full"
64
- Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "voice-full"
64
+ Requires-Dist: librosa>=0.10.0; extra == "voice-full"
65
65
  Requires-Dist: soundfile>=0.12.1; extra == "voice-full"
66
66
  Requires-Dist: tiktoken>=0.6.0; extra == "voice-full"
67
67
  Provides-Extra: core-tts
@@ -69,7 +69,7 @@ Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "core-tts"
69
69
  Requires-Dist: torch<2.4.0,>=2.0.0; extra == "core-tts"
70
70
  Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "core-tts"
71
71
  Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "core-tts"
72
- Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "core-tts"
72
+ Requires-Dist: librosa>=0.10.0; extra == "core-tts"
73
73
  Provides-Extra: core-stt
74
74
  Requires-Dist: openai-whisper>=20230314; extra == "core-stt"
75
75
  Requires-Dist: tiktoken>=0.6.0; extra == "core-stt"
@@ -164,34 +164,58 @@ AbstractVoice automatically detects espeak-ng and upgrades to premium quality vo
164
164
 
165
165
  ## Quick Start
166
166
 
167
- ### Basic Usage (Minimal Installation)
167
+ ### Instant TTS (v0.4.0+)
168
168
 
169
169
  ```python
170
- # First install with minimal dependencies
171
- # pip install abstractvoice
172
-
173
170
  from abstractvoice import VoiceManager
174
171
 
175
- # This will show a helpful error message with installation instructions
176
- try:
177
- vm = VoiceManager()
178
- except ImportError as e:
179
- print(e) # Shows: "TTS functionality requires optional dependencies..."
180
- # Follow the instructions to install: pip install abstractvoice[all]
172
+ # Initialize voice manager - automatically downloads essential model if needed
173
+ vm = VoiceManager()
174
+
175
+ # Text-to-speech works immediately!
176
+ vm.speak("Hello! TTS works out of the box!")
181
177
  ```
182
178
 
183
- ### Full Usage Example
179
+ **That's it!** AbstractVoice v0.4.0+ automatically:
180
+ - ✅ Downloads essential English model (107MB) on first use
181
+ - ✅ Caches models permanently for offline use
182
+ - ✅ Works immediately after first setup
183
+ - ✅ No complex configuration needed
184
184
 
185
- ```python
186
- # After installing with: pip install abstractvoice[all]
185
+ ### 🌍 Multi-Language Support
187
186
 
188
- from abstractvoice import VoiceManager
187
+ ```python
188
+ # Download and use French voice
189
+ vm.download_model('fr.css10_vits') # Downloads automatically
190
+ vm.set_language('fr')
191
+ vm.speak("Bonjour! Je parle français maintenant.")
192
+
193
+ # Download and use German voice
194
+ vm.download_model('de.thorsten_vits')
195
+ vm.set_language('de')
196
+ vm.speak("Hallo! Ich spreche jetzt Deutsch.")
197
+ ```
189
198
 
190
- # Initialize voice manager
191
- vm = VoiceManager(language='en', debug_mode=True)
199
+ ### 🔧 Check System Status
192
200
 
193
- # Text-to-speech
194
- vm.speak("Hello! I can speak text and listen for responses.")
201
+ ```python
202
+ from abstractvoice import is_ready, get_status, list_models
203
+ import json
204
+
205
+ # Quick readiness check
206
+ ready = is_ready()
207
+ print(f"TTS ready: {ready}")
208
+
209
+ # Get detailed status
210
+ status = json.loads(get_status())
211
+ print(f"Models cached: {status['total_cached']}")
212
+ print(f"Offline ready: {status['ready_for_offline']}")
213
+
214
+ # List all available models
215
+ models = json.loads(list_models())
216
+ for lang, voices in models.items():
217
+ print(f"{lang}: {len(voices)} voices available")
218
+ ```
195
219
 
196
220
  # Speech-to-text with callbacks
197
221
  def on_transcription(text):
@@ -1289,6 +1313,80 @@ voice_manager.listen(
1289
1313
  )
1290
1314
  ```
1291
1315
 
1316
+ ## 💻 CLI Commands (v0.4.0+)
1317
+
1318
+ AbstractVoice provides powerful CLI commands for model management and voice interactions.
1319
+
1320
+ ### Model Management
1321
+
1322
+ ```bash
1323
+ # Download essential model for offline use (recommended first step)
1324
+ abstractvoice download-models
1325
+
1326
+ # Download models for specific languages
1327
+ abstractvoice download-models --language fr # French
1328
+ abstractvoice download-models --language de # German
1329
+ abstractvoice download-models --language it # Italian
1330
+ abstractvoice download-models --language es # Spanish
1331
+
1332
+ # Download specific model by name
1333
+ abstractvoice download-models --model tts_models/fr/css10/vits
1334
+
1335
+ # Download all available models (large download!)
1336
+ abstractvoice download-models --all
1337
+
1338
+ # Check current cache status
1339
+ abstractvoice download-models --status
1340
+
1341
+ # Clear model cache
1342
+ abstractvoice download-models --clear
1343
+ ```
1344
+
1345
+ ### Voice Interface
1346
+
1347
+ ```bash
1348
+ # Start voice interface (default)
1349
+ abstractvoice
1350
+
1351
+ # Start CLI REPL with specific language
1352
+ abstractvoice cli --language fr
1353
+
1354
+ # Start with specific model
1355
+ abstractvoice --model granite3.3:2b --language de
1356
+
1357
+ # Run simple example
1358
+ abstractvoice simple
1359
+
1360
+ # Check dependencies
1361
+ abstractvoice check-deps
1362
+ ```
1363
+
1364
+ ### CLI Voice Commands
1365
+
1366
+ In the CLI REPL, use these commands:
1367
+
1368
+ ```bash
1369
+ # List all available voices with download status
1370
+ /setvoice
1371
+
1372
+ # Download and set specific voice
1373
+ /setvoice fr.css10_vits # French CSS10 VITS
1374
+ /setvoice de.thorsten_vits # German Thorsten
1375
+ /setvoice it.mai_male_vits # Italian Male
1376
+
1377
+ # Change language
1378
+ /language fr
1379
+ /language de
1380
+
1381
+ # Voice controls
1382
+ /pause # Pause current speech
1383
+ /resume # Resume speech
1384
+ /stop # Stop speech
1385
+
1386
+ # Exit
1387
+ /exit
1388
+ ```
1389
+
1292
1390
  ## Perspectives
1293
1391
 
1294
1392
  This is a test project that I designed with examples to work with Ollama, but I will adapt the examples and abstractvoice to work with any LLM provider (anthropic, openai, etc).
@@ -0,0 +1,23 @@
1
+ abstractvoice/__init__.py,sha256=HZYSCQ-xztoj7gWr5dVLBsGh4AYrViTYe8-ze4b-ynY,1011
2
+ abstractvoice/__main__.py,sha256=e6jhoONg3uwwPUCdnr68bSRTT1RrpWy2DrOJ6ozMJVc,4775
3
+ abstractvoice/dependency_check.py,sha256=BUUADz4un4_FCZzNpgwk1qpJ6yqVi5Pvjfd3JLS8hAI,10045
4
+ abstractvoice/model_manager.py,sha256=hnN3PTaY109mjTjgBuOB8yfAYVlMpqtMVBljLASRUi4,14275
5
+ abstractvoice/recognition.py,sha256=4KtDUDFixEYuBUMDH2fWaD9csKlwA9tqXkMAkyQMSMo,11259
6
+ abstractvoice/simple_model_manager.py,sha256=DTvEBEPtfu9zJA6V3S8SaWQ_pDYFlK_SoOMlnnRjBtk,13801
7
+ abstractvoice/voice_manager.py,sha256=n7QHZPR1LWh3RjEBQ3LVrBKoOr5zccc3soKah5CBrac,32584
8
+ abstractvoice/examples/__init__.py,sha256=94vpKJDlfOrEBIUETg-57Q5Z7fYDidg6v4UzV7V_lZA,60
9
+ abstractvoice/examples/cli_repl.py,sha256=kIgvgrGfyejX8-VFeFhvAVqrp3X-s-K3Ul861aM4Bh8,44220
10
+ abstractvoice/examples/voice_cli.py,sha256=SYnFkz9KWWTISLgS2beJzb2tzLoz4dXpHQBWpKgS0sc,11585
11
+ abstractvoice/examples/web_api.py,sha256=0g5LKJpl7fZepPQJL25AcdaevV-xv34VqqyWGYYchPk,6376
12
+ abstractvoice/stt/__init__.py,sha256=PFc6la3tTkxT4TJYwb0PnMIahM_hFtU4pNQdeKmbooo,120
13
+ abstractvoice/stt/transcriber.py,sha256=GdaH1OsCHu4Vu9rUsQlzH6X9bfcnoiK5tGz1AW_uj6Q,5481
14
+ abstractvoice/tts/__init__.py,sha256=WgJrxqdc_qaRyfFt1jbgMQD9S757jYuBpDzMRB02TFs,122
15
+ abstractvoice/tts/tts_engine.py,sha256=HstJMwxTbZJx87Q-CY4mWeKHKbj17DhdvDdlch3xUNQ,49725
16
+ abstractvoice/vad/__init__.py,sha256=RIIbFw25jNHgel06E4VvTWJnXjwjeFZ98m1Vx9hVjuo,119
17
+ abstractvoice/vad/voice_detector.py,sha256=ghrhpDFlIR5TsMB2gpigXY6t5c_1yZ7vEX1imAMgWjc,3166
18
+ abstractvoice-0.4.1.dist-info/licenses/LICENSE,sha256=TiDPM5WcFRQPoC5e46jGMeMppZ-eu0eFx_HytjE49bk,1105
19
+ abstractvoice-0.4.1.dist-info/METADATA,sha256=AN_KjRcI2ZaetOIuAb9JOf4dvFWJI7AckQpV25wq2tI,40713
20
+ abstractvoice-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ abstractvoice-0.4.1.dist-info/entry_points.txt,sha256=3bDX2dNOGvrsTx1wZ_o_hVgmM_a2zbcHc1ZkL154rN4,72
22
+ abstractvoice-0.4.1.dist-info/top_level.txt,sha256=a1qyxqgF1O8cJtPKpcJuImGZ_uXqPNghbLZ9gp-UiOo,14
23
+ abstractvoice-0.4.1.dist-info/RECORD,,
@@ -1,21 +0,0 @@
1
- abstractvoice/__init__.py,sha256=6GWG6ruCOQ73dOK1-lGB4F8fvjoAtsAP8fIoYCnVuZk,817
2
- abstractvoice/__main__.py,sha256=e6jhoONg3uwwPUCdnr68bSRTT1RrpWy2DrOJ6ozMJVc,4775
3
- abstractvoice/dependency_check.py,sha256=BUUADz4un4_FCZzNpgwk1qpJ6yqVi5Pvjfd3JLS8hAI,10045
4
- abstractvoice/recognition.py,sha256=4KtDUDFixEYuBUMDH2fWaD9csKlwA9tqXkMAkyQMSMo,11259
5
- abstractvoice/voice_manager.py,sha256=WYuN949pzf4pw8SE3g40OQZNC1CbgUZ5SzvpAGAIfPI,29995
6
- abstractvoice/examples/__init__.py,sha256=94vpKJDlfOrEBIUETg-57Q5Z7fYDidg6v4UzV7V_lZA,60
7
- abstractvoice/examples/cli_repl.py,sha256=39KO2zbQCG3bkuzrMEp1txLherw2rU4aGG2KTUHBYW0,42636
8
- abstractvoice/examples/voice_cli.py,sha256=oliUPUZUPR6HaVaOtn-vAM-Loq3PDqkP34w-X3xxzbY,9702
9
- abstractvoice/examples/web_api.py,sha256=0g5LKJpl7fZepPQJL25AcdaevV-xv34VqqyWGYYchPk,6376
10
- abstractvoice/stt/__init__.py,sha256=PFc6la3tTkxT4TJYwb0PnMIahM_hFtU4pNQdeKmbooo,120
11
- abstractvoice/stt/transcriber.py,sha256=GdaH1OsCHu4Vu9rUsQlzH6X9bfcnoiK5tGz1AW_uj6Q,5481
12
- abstractvoice/tts/__init__.py,sha256=WgJrxqdc_qaRyfFt1jbgMQD9S757jYuBpDzMRB02TFs,122
13
- abstractvoice/tts/tts_engine.py,sha256=9CZAZITZ_VNZs0grwsqWIFj3aUsHvrWeFVV66lH_Bf8,44926
14
- abstractvoice/vad/__init__.py,sha256=RIIbFw25jNHgel06E4VvTWJnXjwjeFZ98m1Vx9hVjuo,119
15
- abstractvoice/vad/voice_detector.py,sha256=ghrhpDFlIR5TsMB2gpigXY6t5c_1yZ7vEX1imAMgWjc,3166
16
- abstractvoice-0.3.0.dist-info/licenses/LICENSE,sha256=TiDPM5WcFRQPoC5e46jGMeMppZ-eu0eFx_HytjE49bk,1105
17
- abstractvoice-0.3.0.dist-info/METADATA,sha256=_XLernZJC91kjzhBMIecBMN4bWcd2AerbPZ8rOmwFIc,38420
18
- abstractvoice-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- abstractvoice-0.3.0.dist-info/entry_points.txt,sha256=3bDX2dNOGvrsTx1wZ_o_hVgmM_a2zbcHc1ZkL154rN4,72
20
- abstractvoice-0.3.0.dist-info/top_level.txt,sha256=a1qyxqgF1O8cJtPKpcJuImGZ_uXqPNghbLZ9gp-UiOo,14
21
- abstractvoice-0.3.0.dist-info/RECORD,,