abstractvoice 0.3.1__py3-none-any.whl → 0.4.6__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.
- abstractvoice/__init__.py +5 -2
- abstractvoice/examples/cli_repl.py +81 -44
- abstractvoice/examples/voice_cli.py +56 -20
- abstractvoice/instant_setup.py +83 -0
- abstractvoice/simple_model_manager.py +500 -0
- abstractvoice/tts/tts_engine.py +253 -23
- abstractvoice/voice_manager.py +176 -21
- {abstractvoice-0.3.1.dist-info → abstractvoice-0.4.6.dist-info}/METADATA +125 -19
- abstractvoice-0.4.6.dist-info/RECORD +23 -0
- abstractvoice-0.3.1.dist-info/RECORD +0 -21
- {abstractvoice-0.3.1.dist-info → abstractvoice-0.4.6.dist-info}/WHEEL +0 -0
- {abstractvoice-0.3.1.dist-info → abstractvoice-0.4.6.dist-info}/entry_points.txt +0 -0
- {abstractvoice-0.3.1.dist-info → abstractvoice-0.4.6.dist-info}/licenses/LICENSE +0 -0
- {abstractvoice-0.3.1.dist-info → abstractvoice-0.4.6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: abstractvoice
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.6
|
|
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
|
|
@@ -19,6 +19,14 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: numpy>=1.24.0
|
|
21
21
|
Requires-Dist: requests>=2.31.0
|
|
22
|
+
Requires-Dist: appdirs>=1.4.0
|
|
23
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0
|
|
24
|
+
Requires-Dist: torch<2.4.0,>=2.0.0
|
|
25
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0
|
|
26
|
+
Requires-Dist: torchaudio<2.4.0,>=2.0.0
|
|
27
|
+
Requires-Dist: librosa>=0.10.0
|
|
28
|
+
Requires-Dist: sounddevice>=0.4.6
|
|
29
|
+
Requires-Dist: soundfile>=0.12.1
|
|
22
30
|
Provides-Extra: voice
|
|
23
31
|
Requires-Dist: sounddevice>=0.4.6; extra == "voice"
|
|
24
32
|
Requires-Dist: webrtcvad>=2.0.10; extra == "voice"
|
|
@@ -164,34 +172,58 @@ AbstractVoice automatically detects espeak-ng and upgrades to premium quality vo
|
|
|
164
172
|
|
|
165
173
|
## Quick Start
|
|
166
174
|
|
|
167
|
-
###
|
|
175
|
+
### ⚡ Instant TTS (v0.4.0+)
|
|
168
176
|
|
|
169
177
|
```python
|
|
170
|
-
# First install with minimal dependencies
|
|
171
|
-
# pip install abstractvoice
|
|
172
|
-
|
|
173
178
|
from abstractvoice import VoiceManager
|
|
174
179
|
|
|
175
|
-
#
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
# Follow the instructions to install: pip install abstractvoice[all]
|
|
180
|
+
# Initialize voice manager - automatically downloads essential model if needed
|
|
181
|
+
vm = VoiceManager()
|
|
182
|
+
|
|
183
|
+
# Text-to-speech works immediately!
|
|
184
|
+
vm.speak("Hello! TTS works out of the box!")
|
|
181
185
|
```
|
|
182
186
|
|
|
183
|
-
|
|
187
|
+
**That's it!** AbstractVoice v0.4.0+ automatically:
|
|
188
|
+
- ✅ Downloads essential English model (107MB) on first use
|
|
189
|
+
- ✅ Caches models permanently for offline use
|
|
190
|
+
- ✅ Works immediately after first setup
|
|
191
|
+
- ✅ No complex configuration needed
|
|
184
192
|
|
|
185
|
-
|
|
186
|
-
# After installing with: pip install abstractvoice[all]
|
|
193
|
+
### 🌍 Multi-Language Support
|
|
187
194
|
|
|
188
|
-
|
|
195
|
+
```python
|
|
196
|
+
# Download and use French voice
|
|
197
|
+
vm.download_model('fr.css10_vits') # Downloads automatically
|
|
198
|
+
vm.set_language('fr')
|
|
199
|
+
vm.speak("Bonjour! Je parle français maintenant.")
|
|
200
|
+
|
|
201
|
+
# Download and use German voice
|
|
202
|
+
vm.download_model('de.thorsten_vits')
|
|
203
|
+
vm.set_language('de')
|
|
204
|
+
vm.speak("Hallo! Ich spreche jetzt Deutsch.")
|
|
205
|
+
```
|
|
189
206
|
|
|
190
|
-
|
|
191
|
-
vm = VoiceManager(language='en', debug_mode=True)
|
|
207
|
+
### 🔧 Check System Status
|
|
192
208
|
|
|
193
|
-
|
|
194
|
-
|
|
209
|
+
```python
|
|
210
|
+
from abstractvoice import is_ready, get_status, list_models
|
|
211
|
+
import json
|
|
212
|
+
|
|
213
|
+
# Quick readiness check
|
|
214
|
+
ready = is_ready()
|
|
215
|
+
print(f"TTS ready: {ready}")
|
|
216
|
+
|
|
217
|
+
# Get detailed status
|
|
218
|
+
status = json.loads(get_status())
|
|
219
|
+
print(f"Models cached: {status['total_cached']}")
|
|
220
|
+
print(f"Offline ready: {status['ready_for_offline']}")
|
|
221
|
+
|
|
222
|
+
# List all available models
|
|
223
|
+
models = json.loads(list_models())
|
|
224
|
+
for lang, voices in models.items():
|
|
225
|
+
print(f"{lang}: {len(voices)} voices available")
|
|
226
|
+
```
|
|
195
227
|
|
|
196
228
|
# Speech-to-text with callbacks
|
|
197
229
|
def on_transcription(text):
|
|
@@ -1289,6 +1321,80 @@ voice_manager.listen(
|
|
|
1289
1321
|
)
|
|
1290
1322
|
```
|
|
1291
1323
|
|
|
1324
|
+
## 💻 CLI Commands (v0.4.0+)
|
|
1325
|
+
|
|
1326
|
+
AbstractVoice provides powerful CLI commands for model management and voice interactions.
|
|
1327
|
+
|
|
1328
|
+
### Model Management
|
|
1329
|
+
|
|
1330
|
+
```bash
|
|
1331
|
+
# Download essential model for offline use (recommended first step)
|
|
1332
|
+
abstractvoice download-models
|
|
1333
|
+
|
|
1334
|
+
# Download models for specific languages
|
|
1335
|
+
abstractvoice download-models --language fr # French
|
|
1336
|
+
abstractvoice download-models --language de # German
|
|
1337
|
+
abstractvoice download-models --language it # Italian
|
|
1338
|
+
abstractvoice download-models --language es # Spanish
|
|
1339
|
+
|
|
1340
|
+
# Download specific model by name
|
|
1341
|
+
abstractvoice download-models --model tts_models/fr/css10/vits
|
|
1342
|
+
|
|
1343
|
+
# Download all available models (large download!)
|
|
1344
|
+
abstractvoice download-models --all
|
|
1345
|
+
|
|
1346
|
+
# Check current cache status
|
|
1347
|
+
abstractvoice download-models --status
|
|
1348
|
+
|
|
1349
|
+
# Clear model cache
|
|
1350
|
+
abstractvoice download-models --clear
|
|
1351
|
+
```
|
|
1352
|
+
|
|
1353
|
+
### Voice Interface
|
|
1354
|
+
|
|
1355
|
+
```bash
|
|
1356
|
+
# Start voice interface (default)
|
|
1357
|
+
abstractvoice
|
|
1358
|
+
|
|
1359
|
+
# Start CLI REPL with specific language
|
|
1360
|
+
abstractvoice cli --language fr
|
|
1361
|
+
|
|
1362
|
+
# Start with specific model
|
|
1363
|
+
abstractvoice --model granite3.3:2b --language de
|
|
1364
|
+
|
|
1365
|
+
# Run simple example
|
|
1366
|
+
abstractvoice simple
|
|
1367
|
+
|
|
1368
|
+
# Check dependencies
|
|
1369
|
+
abstractvoice check-deps
|
|
1370
|
+
```
|
|
1371
|
+
|
|
1372
|
+
### CLI Voice Commands
|
|
1373
|
+
|
|
1374
|
+
In the CLI REPL, use these commands:
|
|
1375
|
+
|
|
1376
|
+
```bash
|
|
1377
|
+
# List all available voices with download status
|
|
1378
|
+
/setvoice
|
|
1379
|
+
|
|
1380
|
+
# Download and set specific voice
|
|
1381
|
+
/setvoice fr.css10_vits # French CSS10 VITS
|
|
1382
|
+
/setvoice de.thorsten_vits # German Thorsten
|
|
1383
|
+
/setvoice it.mai_male_vits # Italian Male
|
|
1384
|
+
|
|
1385
|
+
# Change language
|
|
1386
|
+
/language fr
|
|
1387
|
+
/language de
|
|
1388
|
+
|
|
1389
|
+
# Voice controls
|
|
1390
|
+
/pause # Pause current speech
|
|
1391
|
+
/resume # Resume speech
|
|
1392
|
+
/stop # Stop speech
|
|
1393
|
+
|
|
1394
|
+
# Exit
|
|
1395
|
+
/exit
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1292
1398
|
## Perspectives
|
|
1293
1399
|
|
|
1294
1400
|
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=lUnhUk3fGSJ1DoiQ0o7gSxGbfm8QerKZOc12Vgp-DBY,1011
|
|
2
|
+
abstractvoice/__main__.py,sha256=e6jhoONg3uwwPUCdnr68bSRTT1RrpWy2DrOJ6ozMJVc,4775
|
|
3
|
+
abstractvoice/dependency_check.py,sha256=BUUADz4un4_FCZzNpgwk1qpJ6yqVi5Pvjfd3JLS8hAI,10045
|
|
4
|
+
abstractvoice/instant_setup.py,sha256=_Q8T6tcMSor--1XPlgdOya3lvC-VtClHz4FSgDOXFNI,2667
|
|
5
|
+
abstractvoice/recognition.py,sha256=4KtDUDFixEYuBUMDH2fWaD9csKlwA9tqXkMAkyQMSMo,11259
|
|
6
|
+
abstractvoice/simple_model_manager.py,sha256=nmKP4aAZXKqUG38fylCc7pELNvJWXTzO-YUYHc_jjJc,17484
|
|
7
|
+
abstractvoice/voice_manager.py,sha256=46tQnu9WlwE3mFcwfTmu7Q5hwg8nun9PBZRSIemLsUA,35587
|
|
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=VdgDT01wly8HjWF53t_hDLkJoZc9FWQq2I-nxcSIAp8,11592
|
|
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=iTa9eBH9vPH8VR2qoJX6nmNi6yERvA4Uz1jPu4OXrTA,55074
|
|
16
|
+
abstractvoice/vad/__init__.py,sha256=RIIbFw25jNHgel06E4VvTWJnXjwjeFZ98m1Vx9hVjuo,119
|
|
17
|
+
abstractvoice/vad/voice_detector.py,sha256=ghrhpDFlIR5TsMB2gpigXY6t5c_1yZ7vEX1imAMgWjc,3166
|
|
18
|
+
abstractvoice-0.4.6.dist-info/licenses/LICENSE,sha256=TiDPM5WcFRQPoC5e46jGMeMppZ-eu0eFx_HytjE49bk,1105
|
|
19
|
+
abstractvoice-0.4.6.dist-info/METADATA,sha256=YyQn5POiq7AE0NYO3JuyYmg3cYKgPH8YAgnB--f7ubE,41000
|
|
20
|
+
abstractvoice-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
abstractvoice-0.4.6.dist-info/entry_points.txt,sha256=3bDX2dNOGvrsTx1wZ_o_hVgmM_a2zbcHc1ZkL154rN4,72
|
|
22
|
+
abstractvoice-0.4.6.dist-info/top_level.txt,sha256=a1qyxqgF1O8cJtPKpcJuImGZ_uXqPNghbLZ9gp-UiOo,14
|
|
23
|
+
abstractvoice-0.4.6.dist-info/RECORD,,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
abstractvoice/__init__.py,sha256=ussQd6aW6mcY5_7XIgjprhW0H1wmyixtEiqSE4xOWEc,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.1.dist-info/licenses/LICENSE,sha256=TiDPM5WcFRQPoC5e46jGMeMppZ-eu0eFx_HytjE49bk,1105
|
|
17
|
-
abstractvoice-0.3.1.dist-info/METADATA,sha256=oeRd6haFY1aL-7_0N2Qx5xdC2zN7pM3noJtIHXFJzvI,38388
|
|
18
|
-
abstractvoice-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
-
abstractvoice-0.3.1.dist-info/entry_points.txt,sha256=3bDX2dNOGvrsTx1wZ_o_hVgmM_a2zbcHc1ZkL154rN4,72
|
|
20
|
-
abstractvoice-0.3.1.dist-info/top_level.txt,sha256=a1qyxqgF1O8cJtPKpcJuImGZ_uXqPNghbLZ9gp-UiOo,14
|
|
21
|
-
abstractvoice-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|