abstractvoice 0.2.0__tar.gz → 0.2.1__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.
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/PKG-INFO +37 -69
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/__main__.py +13 -1
- abstractvoice-0.2.1/abstractvoice/dependency_check.py +274 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/tts/tts_engine.py +64 -10
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice.egg-info/PKG-INFO +37 -69
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice.egg-info/SOURCES.txt +1 -0
- abstractvoice-0.2.1/abstractvoice.egg-info/requires.txt +71 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/pyproject.toml +31 -61
- abstractvoice-0.2.0/abstractvoice.egg-info/requires.txt +0 -104
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/LICENSE +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/README.md +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/__init__.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/examples/__init__.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/examples/cli_repl.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/examples/voice_cli.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/examples/web_api.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/recognition.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/stt/__init__.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/stt/transcriber.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/tts/__init__.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/vad/__init__.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/vad/voice_detector.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice/voice_manager.py +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice.egg-info/dependency_links.txt +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice.egg-info/entry_points.txt +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/abstractvoice.egg-info/top_level.txt +0 -0
- {abstractvoice-0.2.0 → abstractvoice-0.2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: abstractvoice
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.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
|
|
@@ -25,10 +25,11 @@ Requires-Dist: webrtcvad>=2.0.10; extra == "voice"
|
|
|
25
25
|
Requires-Dist: PyAudio>=0.2.13; extra == "voice"
|
|
26
26
|
Requires-Dist: soundfile>=0.12.1; extra == "voice"
|
|
27
27
|
Provides-Extra: tts
|
|
28
|
-
Requires-Dist: coqui-tts
|
|
29
|
-
Requires-Dist: torch
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "tts"
|
|
29
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "tts"
|
|
30
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "tts"
|
|
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
33
|
Provides-Extra: stt
|
|
33
34
|
Requires-Dist: openai-whisper>=20230314; extra == "stt"
|
|
34
35
|
Requires-Dist: tiktoken>=0.6.0; extra == "stt"
|
|
@@ -39,10 +40,11 @@ Requires-Dist: sounddevice>=0.4.6; extra == "all"
|
|
|
39
40
|
Requires-Dist: webrtcvad>=2.0.10; extra == "all"
|
|
40
41
|
Requires-Dist: PyAudio>=0.2.13; extra == "all"
|
|
41
42
|
Requires-Dist: openai-whisper>=20230314; extra == "all"
|
|
42
|
-
Requires-Dist: coqui-tts
|
|
43
|
-
Requires-Dist: torch
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
43
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "all"
|
|
44
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "all"
|
|
45
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "all"
|
|
46
|
+
Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "all"
|
|
47
|
+
Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "all"
|
|
46
48
|
Requires-Dist: soundfile>=0.12.1; extra == "all"
|
|
47
49
|
Requires-Dist: flask>=2.0.0; extra == "all"
|
|
48
50
|
Requires-Dist: tiktoken>=0.6.0; extra == "all"
|
|
@@ -50,66 +52,32 @@ Provides-Extra: dev
|
|
|
50
52
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
51
53
|
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
52
54
|
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
53
|
-
Provides-Extra:
|
|
54
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "
|
|
55
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "
|
|
56
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "
|
|
57
|
-
Requires-Dist: openai-whisper>=20230314; extra == "
|
|
58
|
-
Requires-Dist: coqui-tts
|
|
59
|
-
Requires-Dist: torch
|
|
60
|
-
Requires-Dist:
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
Requires-Dist:
|
|
63
|
-
Requires-Dist:
|
|
64
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "
|
|
65
|
-
Provides-Extra:
|
|
66
|
-
Requires-Dist:
|
|
67
|
-
Requires-Dist:
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist:
|
|
71
|
-
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
|
|
75
|
-
Requires-Dist:
|
|
76
|
-
Requires-Dist:
|
|
77
|
-
|
|
78
|
-
Requires-Dist:
|
|
79
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "es"
|
|
80
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "es"
|
|
81
|
-
Requires-Dist: openai-whisper>=20230314; extra == "es"
|
|
82
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "es"
|
|
83
|
-
Requires-Dist: torch>=2.0.0; extra == "es"
|
|
84
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "es"
|
|
85
|
-
Requires-Dist: librosa>=0.10.0; extra == "es"
|
|
86
|
-
Requires-Dist: soundfile>=0.12.1; extra == "es"
|
|
87
|
-
Requires-Dist: flask>=2.0.0; extra == "es"
|
|
88
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "es"
|
|
89
|
-
Provides-Extra: de
|
|
90
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "de"
|
|
91
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "de"
|
|
92
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "de"
|
|
93
|
-
Requires-Dist: openai-whisper>=20230314; extra == "de"
|
|
94
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "de"
|
|
95
|
-
Requires-Dist: torch>=2.0.0; extra == "de"
|
|
96
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "de"
|
|
97
|
-
Requires-Dist: librosa>=0.10.0; extra == "de"
|
|
98
|
-
Requires-Dist: soundfile>=0.12.1; extra == "de"
|
|
99
|
-
Requires-Dist: flask>=2.0.0; extra == "de"
|
|
100
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "de"
|
|
101
|
-
Provides-Extra: it
|
|
102
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "it"
|
|
103
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "it"
|
|
104
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "it"
|
|
105
|
-
Requires-Dist: openai-whisper>=20230314; extra == "it"
|
|
106
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "it"
|
|
107
|
-
Requires-Dist: torch>=2.0.0; extra == "it"
|
|
108
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "it"
|
|
109
|
-
Requires-Dist: librosa>=0.10.0; extra == "it"
|
|
110
|
-
Requires-Dist: soundfile>=0.12.1; extra == "it"
|
|
111
|
-
Requires-Dist: flask>=2.0.0; extra == "it"
|
|
112
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "it"
|
|
55
|
+
Provides-Extra: voice-full
|
|
56
|
+
Requires-Dist: sounddevice>=0.4.6; extra == "voice-full"
|
|
57
|
+
Requires-Dist: webrtcvad>=2.0.10; extra == "voice-full"
|
|
58
|
+
Requires-Dist: PyAudio>=0.2.13; extra == "voice-full"
|
|
59
|
+
Requires-Dist: openai-whisper>=20230314; extra == "voice-full"
|
|
60
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "voice-full"
|
|
61
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "voice-full"
|
|
62
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "voice-full"
|
|
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"
|
|
65
|
+
Requires-Dist: soundfile>=0.12.1; extra == "voice-full"
|
|
66
|
+
Requires-Dist: tiktoken>=0.6.0; extra == "voice-full"
|
|
67
|
+
Provides-Extra: core-tts
|
|
68
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "core-tts"
|
|
69
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "core-tts"
|
|
70
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "core-tts"
|
|
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"
|
|
73
|
+
Provides-Extra: core-stt
|
|
74
|
+
Requires-Dist: openai-whisper>=20230314; extra == "core-stt"
|
|
75
|
+
Requires-Dist: tiktoken>=0.6.0; extra == "core-stt"
|
|
76
|
+
Provides-Extra: audio-only
|
|
77
|
+
Requires-Dist: sounddevice>=0.4.6; extra == "audio-only"
|
|
78
|
+
Requires-Dist: webrtcvad>=2.0.10; extra == "audio-only"
|
|
79
|
+
Requires-Dist: PyAudio>=0.2.13; extra == "audio-only"
|
|
80
|
+
Requires-Dist: soundfile>=0.12.1; extra == "audio-only"
|
|
113
81
|
Dynamic: license-file
|
|
114
82
|
|
|
115
83
|
# AbstractVoice
|
|
@@ -15,11 +15,13 @@ def print_examples():
|
|
|
15
15
|
print(" cli - Command-line REPL example")
|
|
16
16
|
print(" web - Web API example")
|
|
17
17
|
print(" simple - Simple usage example")
|
|
18
|
+
print(" check-deps - Check dependency compatibility")
|
|
18
19
|
print("\nUsage: python -m abstractvoice <example> [--language <lang>] [args...]")
|
|
19
20
|
print("\nSupported languages: en, fr, es, de, it, ru, multilingual")
|
|
20
21
|
print("\nExamples:")
|
|
21
22
|
print(" python -m abstractvoice cli --language fr # French CLI")
|
|
22
23
|
print(" python -m abstractvoice simple --language ru # Russian simple example")
|
|
24
|
+
print(" python -m abstractvoice check-deps # Check dependencies")
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
def simple_example():
|
|
@@ -95,7 +97,7 @@ def simple_example():
|
|
|
95
97
|
def main():
|
|
96
98
|
"""Main entry point."""
|
|
97
99
|
parser = argparse.ArgumentParser(description="AbstractVoice examples")
|
|
98
|
-
parser.add_argument("example", nargs="?", help="Example to run (cli, web, simple)")
|
|
100
|
+
parser.add_argument("example", nargs="?", help="Example to run (cli, web, simple, check-deps)")
|
|
99
101
|
parser.add_argument("--language", "--lang", default="en",
|
|
100
102
|
choices=["en", "fr", "es", "de", "it", "ru", "multilingual"],
|
|
101
103
|
help="Voice language for examples")
|
|
@@ -107,6 +109,16 @@ def main():
|
|
|
107
109
|
print_examples()
|
|
108
110
|
return
|
|
109
111
|
|
|
112
|
+
# Handle check-deps specially (doesn't need language)
|
|
113
|
+
if args.example == "check-deps":
|
|
114
|
+
from abstractvoice.dependency_check import check_dependencies
|
|
115
|
+
try:
|
|
116
|
+
check_dependencies(verbose=True)
|
|
117
|
+
except Exception as e:
|
|
118
|
+
print(f"❌ Error running dependency check: {e}")
|
|
119
|
+
print("This might indicate a dependency issue.")
|
|
120
|
+
return
|
|
121
|
+
|
|
110
122
|
# Set remaining args as sys.argv for the examples, including language
|
|
111
123
|
if args.language != "en":
|
|
112
124
|
remaining = ["--language", args.language] + remaining
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"""Dependency compatibility checker for AbstractVoice.
|
|
2
|
+
|
|
3
|
+
This module provides utilities to check dependency versions and compatibility,
|
|
4
|
+
helping users diagnose and resolve installation issues.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import importlib
|
|
9
|
+
from typing import Dict, List, Tuple, Optional
|
|
10
|
+
import warnings
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DependencyChecker:
|
|
14
|
+
"""Check and validate AbstractVoice dependencies."""
|
|
15
|
+
|
|
16
|
+
# Known compatible version ranges
|
|
17
|
+
PYTORCH_COMPAT = {
|
|
18
|
+
"torch": ("2.0.0", "2.4.0"),
|
|
19
|
+
"torchvision": ("0.15.0", "0.19.0"),
|
|
20
|
+
"torchaudio": ("2.0.0", "2.4.0"),
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
CORE_DEPS = {
|
|
24
|
+
"numpy": ("1.24.0", None),
|
|
25
|
+
"requests": ("2.31.0", None),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
OPTIONAL_DEPS = {
|
|
29
|
+
"coqui-tts": ("0.27.0", "0.30.0"),
|
|
30
|
+
"openai-whisper": ("20230314", None),
|
|
31
|
+
"sounddevice": ("0.4.6", None),
|
|
32
|
+
"librosa": ("0.10.0", "0.11.0"),
|
|
33
|
+
"flask": ("2.0.0", None),
|
|
34
|
+
"webrtcvad": ("2.0.10", None),
|
|
35
|
+
"PyAudio": ("0.2.13", None),
|
|
36
|
+
"soundfile": ("0.12.1", None),
|
|
37
|
+
"tiktoken": ("0.6.0", None),
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
def __init__(self, verbose: bool = True):
|
|
41
|
+
self.verbose = verbose
|
|
42
|
+
self.results = {}
|
|
43
|
+
|
|
44
|
+
def _parse_version(self, version_str: str) -> Tuple[int, ...]:
|
|
45
|
+
"""Parse version string into tuple of integers for comparison."""
|
|
46
|
+
try:
|
|
47
|
+
# Handle version strings like "20230314" or "2.0.0"
|
|
48
|
+
if version_str.isdigit():
|
|
49
|
+
return (int(version_str),)
|
|
50
|
+
|
|
51
|
+
# Standard semantic versioning
|
|
52
|
+
version_parts = version_str.split('.')
|
|
53
|
+
return tuple(int(part) for part in version_parts if part.isdigit())
|
|
54
|
+
except (ValueError, AttributeError):
|
|
55
|
+
return (0,)
|
|
56
|
+
|
|
57
|
+
def _check_version_range(self, current: str, min_ver: Optional[str], max_ver: Optional[str]) -> bool:
|
|
58
|
+
"""Check if current version is within the specified range."""
|
|
59
|
+
current_tuple = self._parse_version(current)
|
|
60
|
+
|
|
61
|
+
if min_ver:
|
|
62
|
+
min_tuple = self._parse_version(min_ver)
|
|
63
|
+
if current_tuple < min_tuple:
|
|
64
|
+
return False
|
|
65
|
+
|
|
66
|
+
if max_ver:
|
|
67
|
+
max_tuple = self._parse_version(max_ver)
|
|
68
|
+
if current_tuple >= max_tuple:
|
|
69
|
+
return False
|
|
70
|
+
|
|
71
|
+
return True
|
|
72
|
+
|
|
73
|
+
def _check_package(self, package_name: str, min_ver: Optional[str], max_ver: Optional[str]) -> Dict:
|
|
74
|
+
"""Check a single package installation and version."""
|
|
75
|
+
try:
|
|
76
|
+
module = importlib.import_module(package_name.replace('-', '_'))
|
|
77
|
+
version = getattr(module, '__version__', 'unknown')
|
|
78
|
+
|
|
79
|
+
# Special handling for packages with different version attributes
|
|
80
|
+
if version == 'unknown':
|
|
81
|
+
if hasattr(module, 'version'):
|
|
82
|
+
version = module.version
|
|
83
|
+
elif hasattr(module, 'VERSION'):
|
|
84
|
+
version = module.VERSION
|
|
85
|
+
elif package_name == 'openai-whisper':
|
|
86
|
+
# Whisper uses different versioning
|
|
87
|
+
try:
|
|
88
|
+
import whisper
|
|
89
|
+
version = getattr(whisper, '__version__', 'installed')
|
|
90
|
+
except:
|
|
91
|
+
version = 'installed'
|
|
92
|
+
|
|
93
|
+
compatible = self._check_version_range(str(version), min_ver, max_ver)
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
'status': 'installed',
|
|
97
|
+
'version': str(version),
|
|
98
|
+
'compatible': compatible,
|
|
99
|
+
'min_version': min_ver,
|
|
100
|
+
'max_version': max_ver
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
except ImportError:
|
|
104
|
+
return {
|
|
105
|
+
'status': 'missing',
|
|
106
|
+
'version': None,
|
|
107
|
+
'compatible': False,
|
|
108
|
+
'min_version': min_ver,
|
|
109
|
+
'max_version': max_ver
|
|
110
|
+
}
|
|
111
|
+
except Exception as e:
|
|
112
|
+
return {
|
|
113
|
+
'status': 'error',
|
|
114
|
+
'version': None,
|
|
115
|
+
'compatible': False,
|
|
116
|
+
'error': str(e),
|
|
117
|
+
'min_version': min_ver,
|
|
118
|
+
'max_version': max_ver
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
def check_core_dependencies(self) -> Dict:
|
|
122
|
+
"""Check core dependencies (always required)."""
|
|
123
|
+
results = {}
|
|
124
|
+
for package, (min_ver, max_ver) in self.CORE_DEPS.items():
|
|
125
|
+
results[package] = self._check_package(package, min_ver, max_ver)
|
|
126
|
+
return results
|
|
127
|
+
|
|
128
|
+
def check_pytorch_ecosystem(self) -> Dict:
|
|
129
|
+
"""Check PyTorch ecosystem for compatibility issues."""
|
|
130
|
+
results = {}
|
|
131
|
+
for package, (min_ver, max_ver) in self.PYTORCH_COMPAT.items():
|
|
132
|
+
results[package] = self._check_package(package, min_ver, max_ver)
|
|
133
|
+
return results
|
|
134
|
+
|
|
135
|
+
def check_optional_dependencies(self) -> Dict:
|
|
136
|
+
"""Check optional dependencies."""
|
|
137
|
+
results = {}
|
|
138
|
+
for package, (min_ver, max_ver) in self.OPTIONAL_DEPS.items():
|
|
139
|
+
results[package] = self._check_package(package, min_ver, max_ver)
|
|
140
|
+
return results
|
|
141
|
+
|
|
142
|
+
def check_pytorch_conflicts(self) -> List[str]:
|
|
143
|
+
"""Detect specific PyTorch/TorchVision conflicts."""
|
|
144
|
+
conflicts = []
|
|
145
|
+
|
|
146
|
+
try:
|
|
147
|
+
import torch
|
|
148
|
+
import torchvision
|
|
149
|
+
|
|
150
|
+
torch_version = self._parse_version(torch.__version__)
|
|
151
|
+
tv_version = self._parse_version(torchvision.__version__)
|
|
152
|
+
|
|
153
|
+
# Check known incompatible combinations
|
|
154
|
+
if torch_version >= (2, 3, 0) and tv_version < (0, 18, 0):
|
|
155
|
+
conflicts.append(f"PyTorch {torch.__version__} is incompatible with TorchVision {torchvision.__version__}")
|
|
156
|
+
|
|
157
|
+
# Test torchvision::nms operator availability
|
|
158
|
+
try:
|
|
159
|
+
from torchvision.ops import nms
|
|
160
|
+
# Try to use nms to check if it actually works
|
|
161
|
+
import torch
|
|
162
|
+
boxes = torch.tensor([[0, 0, 1, 1]], dtype=torch.float32)
|
|
163
|
+
scores = torch.tensor([1.0], dtype=torch.float32)
|
|
164
|
+
nms(boxes, scores, 0.5)
|
|
165
|
+
except Exception as e:
|
|
166
|
+
if "torchvision::nms does not exist" in str(e):
|
|
167
|
+
conflicts.append("TorchVision NMS operator not available - version mismatch detected")
|
|
168
|
+
|
|
169
|
+
except ImportError:
|
|
170
|
+
pass # PyTorch not installed
|
|
171
|
+
|
|
172
|
+
return conflicts
|
|
173
|
+
|
|
174
|
+
def check_all(self) -> Dict:
|
|
175
|
+
"""Run comprehensive dependency check."""
|
|
176
|
+
results = {
|
|
177
|
+
'core': self.check_core_dependencies(),
|
|
178
|
+
'pytorch': self.check_pytorch_ecosystem(),
|
|
179
|
+
'optional': self.check_optional_dependencies(),
|
|
180
|
+
'conflicts': self.check_pytorch_conflicts(),
|
|
181
|
+
'python_version': sys.version,
|
|
182
|
+
'platform': sys.platform
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
self.results = results
|
|
186
|
+
return results
|
|
187
|
+
|
|
188
|
+
def print_report(self, results: Optional[Dict] = None):
|
|
189
|
+
"""Print a formatted dependency report."""
|
|
190
|
+
if results is None:
|
|
191
|
+
results = self.results
|
|
192
|
+
|
|
193
|
+
print("🔍 AbstractVoice Dependency Check Report")
|
|
194
|
+
print("=" * 50)
|
|
195
|
+
|
|
196
|
+
# Python version
|
|
197
|
+
print(f"\n🐍 Python: {results['python_version']}")
|
|
198
|
+
print(f"🖥️ Platform: {results['platform']}")
|
|
199
|
+
|
|
200
|
+
# Core dependencies
|
|
201
|
+
print(f"\n📦 Core Dependencies:")
|
|
202
|
+
for package, info in results['core'].items():
|
|
203
|
+
status_icon = "✅" if info['status'] == 'installed' and info['compatible'] else "❌"
|
|
204
|
+
version_info = f"v{info['version']}" if info['version'] else "not installed"
|
|
205
|
+
print(f" {status_icon} {package}: {version_info}")
|
|
206
|
+
|
|
207
|
+
# PyTorch ecosystem
|
|
208
|
+
print(f"\n🔥 PyTorch Ecosystem:")
|
|
209
|
+
pytorch_all_good = True
|
|
210
|
+
for package, info in results['pytorch'].items():
|
|
211
|
+
status_icon = "✅" if info['status'] == 'installed' and info['compatible'] else "❌"
|
|
212
|
+
version_info = f"v{info['version']}" if info['version'] else "not installed"
|
|
213
|
+
if info['status'] != 'installed' or not info['compatible']:
|
|
214
|
+
pytorch_all_good = False
|
|
215
|
+
print(f" {status_icon} {package}: {version_info}")
|
|
216
|
+
|
|
217
|
+
# Conflicts
|
|
218
|
+
if results['conflicts']:
|
|
219
|
+
print(f"\n⚠️ Detected Conflicts:")
|
|
220
|
+
for conflict in results['conflicts']:
|
|
221
|
+
print(f" ❌ {conflict}")
|
|
222
|
+
pytorch_all_good = False
|
|
223
|
+
|
|
224
|
+
if pytorch_all_good and all(info['status'] == 'installed' for info in results['pytorch'].values()):
|
|
225
|
+
print(" 🎉 PyTorch ecosystem looks compatible!")
|
|
226
|
+
|
|
227
|
+
# Optional dependencies
|
|
228
|
+
print(f"\n🔧 Optional Dependencies:")
|
|
229
|
+
installed_optional = []
|
|
230
|
+
missing_optional = []
|
|
231
|
+
|
|
232
|
+
for package, info in results['optional'].items():
|
|
233
|
+
if info['status'] == 'installed':
|
|
234
|
+
status_icon = "✅" if info['compatible'] else "⚠️"
|
|
235
|
+
installed_optional.append(f" {status_icon} {package}: v{info['version']}")
|
|
236
|
+
else:
|
|
237
|
+
missing_optional.append(f" ⭕ {package}: not installed")
|
|
238
|
+
|
|
239
|
+
if installed_optional:
|
|
240
|
+
print(" Installed:")
|
|
241
|
+
for line in installed_optional:
|
|
242
|
+
print(line)
|
|
243
|
+
|
|
244
|
+
if missing_optional:
|
|
245
|
+
print(" Missing:")
|
|
246
|
+
for line in missing_optional:
|
|
247
|
+
print(line)
|
|
248
|
+
|
|
249
|
+
# Recommendations
|
|
250
|
+
print(f"\n💡 Recommendations:")
|
|
251
|
+
|
|
252
|
+
if not pytorch_all_good:
|
|
253
|
+
print(" 🔧 Fix PyTorch conflicts with:")
|
|
254
|
+
print(" pip uninstall torch torchvision torchaudio")
|
|
255
|
+
print(" pip install abstractvoice[all]")
|
|
256
|
+
|
|
257
|
+
if not any(info['status'] == 'installed' for info in results['optional'].values()):
|
|
258
|
+
print(" 📦 Install voice functionality with:")
|
|
259
|
+
print(" pip install abstractvoice[voice-full]")
|
|
260
|
+
|
|
261
|
+
print("\n" + "=" * 50)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def check_dependencies(verbose: bool = True) -> Dict:
|
|
265
|
+
"""Quick function to check all dependencies."""
|
|
266
|
+
checker = DependencyChecker(verbose=verbose)
|
|
267
|
+
results = checker.check_all()
|
|
268
|
+
if verbose:
|
|
269
|
+
checker.print_report(results)
|
|
270
|
+
return results
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
if __name__ == "__main__":
|
|
274
|
+
check_dependencies()
|
|
@@ -24,12 +24,43 @@ def _import_tts():
|
|
|
24
24
|
from TTS.api import TTS
|
|
25
25
|
return TTS
|
|
26
26
|
except ImportError as e:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
error_msg = str(e).lower()
|
|
28
|
+
|
|
29
|
+
# Check for specific PyTorch/TorchVision conflicts
|
|
30
|
+
if "torchvision::nms does not exist" in error_msg or "gpt2pretrainedmodel" in error_msg:
|
|
31
|
+
raise ImportError(
|
|
32
|
+
"❌ PyTorch/TorchVision version conflict detected!\n\n"
|
|
33
|
+
"This is a known compatibility issue. To fix:\n\n"
|
|
34
|
+
"1. Uninstall conflicting packages:\n"
|
|
35
|
+
" pip uninstall torch torchvision torchaudio transformers\n\n"
|
|
36
|
+
"2. Reinstall with compatible versions:\n"
|
|
37
|
+
" pip install abstractvoice[all] # Installs tested compatible versions\n\n"
|
|
38
|
+
"3. Or use specific PyTorch version:\n"
|
|
39
|
+
" pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1\n"
|
|
40
|
+
" pip install abstractvoice[voice-full]\n\n"
|
|
41
|
+
"For conda environments, consider:\n"
|
|
42
|
+
" conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia\n\n"
|
|
43
|
+
f"Original error: {e}"
|
|
44
|
+
) from e
|
|
45
|
+
elif "no module named 'tts'" in error_msg or "coqui" in error_msg:
|
|
46
|
+
raise ImportError(
|
|
47
|
+
"TTS functionality requires coqui-tts. Install with:\n"
|
|
48
|
+
" pip install abstractvoice[tts] # For TTS only\n"
|
|
49
|
+
" pip install abstractvoice[voice-full] # For complete voice functionality\n"
|
|
50
|
+
" pip install abstractvoice[all] # For all features\n"
|
|
51
|
+
f"Original error: {e}"
|
|
52
|
+
) from e
|
|
53
|
+
else:
|
|
54
|
+
# Generic import error
|
|
55
|
+
raise ImportError(
|
|
56
|
+
"TTS functionality requires optional dependencies. Install with:\n"
|
|
57
|
+
" pip install abstractvoice[tts] # For TTS only\n"
|
|
58
|
+
" pip install abstractvoice[voice-full] # For complete voice functionality\n"
|
|
59
|
+
" pip install abstractvoice[all] # For all features\n\n"
|
|
60
|
+
"If you're getting PyTorch-related errors, try:\n"
|
|
61
|
+
" pip install abstractvoice[core-tts] # Lightweight TTS without extras\n\n"
|
|
62
|
+
f"Original error: {e}"
|
|
63
|
+
) from e
|
|
33
64
|
|
|
34
65
|
def _import_audio_deps():
|
|
35
66
|
"""Import audio dependencies with helpful error message if missing."""
|
|
@@ -38,14 +69,37 @@ def _import_audio_deps():
|
|
|
38
69
|
import librosa
|
|
39
70
|
return sd, librosa
|
|
40
71
|
except ImportError as e:
|
|
41
|
-
|
|
72
|
+
error_msg = str(e).lower()
|
|
73
|
+
|
|
74
|
+
if "sounddevice" in error_msg:
|
|
75
|
+
raise ImportError(
|
|
76
|
+
"Audio playback requires sounddevice. Install with:\n"
|
|
77
|
+
" pip install abstractvoice[audio-only] # For audio processing only\n"
|
|
78
|
+
" pip install abstractvoice[voice-full] # For complete voice functionality\n"
|
|
79
|
+
" pip install abstractvoice[all] # For all features\n\n"
|
|
80
|
+
"On some systems, you may need system audio libraries:\n"
|
|
81
|
+
" Ubuntu/Debian: sudo apt-get install portaudio19-dev\n"
|
|
82
|
+
" macOS: brew install portaudio\n"
|
|
83
|
+
" Windows: Usually works out of the box\n\n"
|
|
84
|
+
f"Original error: {e}"
|
|
85
|
+
) from e
|
|
86
|
+
elif "librosa" in error_msg:
|
|
87
|
+
raise ImportError(
|
|
88
|
+
"Audio processing requires librosa. Install with:\n"
|
|
89
|
+
" pip install abstractvoice[tts] # For TTS functionality\n"
|
|
90
|
+
" pip install abstractvoice[voice-full] # For complete voice functionality\n"
|
|
91
|
+
" pip install abstractvoice[all] # For all features\n\n"
|
|
92
|
+
f"Original error: {e}"
|
|
93
|
+
) from e
|
|
94
|
+
else:
|
|
95
|
+
# Generic audio import error
|
|
42
96
|
raise ImportError(
|
|
43
97
|
"Audio functionality requires optional dependencies. Install with:\n"
|
|
44
|
-
" pip install abstractvoice[
|
|
45
|
-
" pip install abstractvoice[
|
|
98
|
+
" pip install abstractvoice[audio-only] # For audio processing only\n"
|
|
99
|
+
" pip install abstractvoice[voice-full] # For complete voice functionality\n"
|
|
100
|
+
" pip install abstractvoice[all] # For all features\n\n"
|
|
46
101
|
f"Original error: {e}"
|
|
47
102
|
) from e
|
|
48
|
-
raise
|
|
49
103
|
|
|
50
104
|
# Suppress the PyTorch FutureWarning about torch.load
|
|
51
105
|
warnings.filterwarnings(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: abstractvoice
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.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
|
|
@@ -25,10 +25,11 @@ Requires-Dist: webrtcvad>=2.0.10; extra == "voice"
|
|
|
25
25
|
Requires-Dist: PyAudio>=0.2.13; extra == "voice"
|
|
26
26
|
Requires-Dist: soundfile>=0.12.1; extra == "voice"
|
|
27
27
|
Provides-Extra: tts
|
|
28
|
-
Requires-Dist: coqui-tts
|
|
29
|
-
Requires-Dist: torch
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "tts"
|
|
29
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "tts"
|
|
30
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "tts"
|
|
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
33
|
Provides-Extra: stt
|
|
33
34
|
Requires-Dist: openai-whisper>=20230314; extra == "stt"
|
|
34
35
|
Requires-Dist: tiktoken>=0.6.0; extra == "stt"
|
|
@@ -39,10 +40,11 @@ Requires-Dist: sounddevice>=0.4.6; extra == "all"
|
|
|
39
40
|
Requires-Dist: webrtcvad>=2.0.10; extra == "all"
|
|
40
41
|
Requires-Dist: PyAudio>=0.2.13; extra == "all"
|
|
41
42
|
Requires-Dist: openai-whisper>=20230314; extra == "all"
|
|
42
|
-
Requires-Dist: coqui-tts
|
|
43
|
-
Requires-Dist: torch
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
43
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "all"
|
|
44
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "all"
|
|
45
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "all"
|
|
46
|
+
Requires-Dist: torchaudio<2.4.0,>=2.0.0; extra == "all"
|
|
47
|
+
Requires-Dist: librosa<0.11.0,>=0.10.0; extra == "all"
|
|
46
48
|
Requires-Dist: soundfile>=0.12.1; extra == "all"
|
|
47
49
|
Requires-Dist: flask>=2.0.0; extra == "all"
|
|
48
50
|
Requires-Dist: tiktoken>=0.6.0; extra == "all"
|
|
@@ -50,66 +52,32 @@ Provides-Extra: dev
|
|
|
50
52
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
51
53
|
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
52
54
|
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
53
|
-
Provides-Extra:
|
|
54
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "
|
|
55
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "
|
|
56
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "
|
|
57
|
-
Requires-Dist: openai-whisper>=20230314; extra == "
|
|
58
|
-
Requires-Dist: coqui-tts
|
|
59
|
-
Requires-Dist: torch
|
|
60
|
-
Requires-Dist:
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
Requires-Dist:
|
|
63
|
-
Requires-Dist:
|
|
64
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "
|
|
65
|
-
Provides-Extra:
|
|
66
|
-
Requires-Dist:
|
|
67
|
-
Requires-Dist:
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist:
|
|
71
|
-
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
|
|
75
|
-
Requires-Dist:
|
|
76
|
-
Requires-Dist:
|
|
77
|
-
|
|
78
|
-
Requires-Dist:
|
|
79
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "es"
|
|
80
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "es"
|
|
81
|
-
Requires-Dist: openai-whisper>=20230314; extra == "es"
|
|
82
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "es"
|
|
83
|
-
Requires-Dist: torch>=2.0.0; extra == "es"
|
|
84
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "es"
|
|
85
|
-
Requires-Dist: librosa>=0.10.0; extra == "es"
|
|
86
|
-
Requires-Dist: soundfile>=0.12.1; extra == "es"
|
|
87
|
-
Requires-Dist: flask>=2.0.0; extra == "es"
|
|
88
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "es"
|
|
89
|
-
Provides-Extra: de
|
|
90
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "de"
|
|
91
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "de"
|
|
92
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "de"
|
|
93
|
-
Requires-Dist: openai-whisper>=20230314; extra == "de"
|
|
94
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "de"
|
|
95
|
-
Requires-Dist: torch>=2.0.0; extra == "de"
|
|
96
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "de"
|
|
97
|
-
Requires-Dist: librosa>=0.10.0; extra == "de"
|
|
98
|
-
Requires-Dist: soundfile>=0.12.1; extra == "de"
|
|
99
|
-
Requires-Dist: flask>=2.0.0; extra == "de"
|
|
100
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "de"
|
|
101
|
-
Provides-Extra: it
|
|
102
|
-
Requires-Dist: sounddevice>=0.4.6; extra == "it"
|
|
103
|
-
Requires-Dist: webrtcvad>=2.0.10; extra == "it"
|
|
104
|
-
Requires-Dist: PyAudio>=0.2.13; extra == "it"
|
|
105
|
-
Requires-Dist: openai-whisper>=20230314; extra == "it"
|
|
106
|
-
Requires-Dist: coqui-tts>=0.27.0; extra == "it"
|
|
107
|
-
Requires-Dist: torch>=2.0.0; extra == "it"
|
|
108
|
-
Requires-Dist: torchaudio>=2.0.0; extra == "it"
|
|
109
|
-
Requires-Dist: librosa>=0.10.0; extra == "it"
|
|
110
|
-
Requires-Dist: soundfile>=0.12.1; extra == "it"
|
|
111
|
-
Requires-Dist: flask>=2.0.0; extra == "it"
|
|
112
|
-
Requires-Dist: tiktoken>=0.6.0; extra == "it"
|
|
55
|
+
Provides-Extra: voice-full
|
|
56
|
+
Requires-Dist: sounddevice>=0.4.6; extra == "voice-full"
|
|
57
|
+
Requires-Dist: webrtcvad>=2.0.10; extra == "voice-full"
|
|
58
|
+
Requires-Dist: PyAudio>=0.2.13; extra == "voice-full"
|
|
59
|
+
Requires-Dist: openai-whisper>=20230314; extra == "voice-full"
|
|
60
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "voice-full"
|
|
61
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "voice-full"
|
|
62
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "voice-full"
|
|
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"
|
|
65
|
+
Requires-Dist: soundfile>=0.12.1; extra == "voice-full"
|
|
66
|
+
Requires-Dist: tiktoken>=0.6.0; extra == "voice-full"
|
|
67
|
+
Provides-Extra: core-tts
|
|
68
|
+
Requires-Dist: coqui-tts<0.30.0,>=0.27.0; extra == "core-tts"
|
|
69
|
+
Requires-Dist: torch<2.4.0,>=2.0.0; extra == "core-tts"
|
|
70
|
+
Requires-Dist: torchvision<0.19.0,>=0.15.0; extra == "core-tts"
|
|
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"
|
|
73
|
+
Provides-Extra: core-stt
|
|
74
|
+
Requires-Dist: openai-whisper>=20230314; extra == "core-stt"
|
|
75
|
+
Requires-Dist: tiktoken>=0.6.0; extra == "core-stt"
|
|
76
|
+
Provides-Extra: audio-only
|
|
77
|
+
Requires-Dist: sounddevice>=0.4.6; extra == "audio-only"
|
|
78
|
+
Requires-Dist: webrtcvad>=2.0.10; extra == "audio-only"
|
|
79
|
+
Requires-Dist: PyAudio>=0.2.13; extra == "audio-only"
|
|
80
|
+
Requires-Dist: soundfile>=0.12.1; extra == "audio-only"
|
|
113
81
|
Dynamic: license-file
|
|
114
82
|
|
|
115
83
|
# AbstractVoice
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
numpy>=1.24.0
|
|
2
|
+
requests>=2.31.0
|
|
3
|
+
|
|
4
|
+
[all]
|
|
5
|
+
sounddevice>=0.4.6
|
|
6
|
+
webrtcvad>=2.0.10
|
|
7
|
+
PyAudio>=0.2.13
|
|
8
|
+
openai-whisper>=20230314
|
|
9
|
+
coqui-tts<0.30.0,>=0.27.0
|
|
10
|
+
torch<2.4.0,>=2.0.0
|
|
11
|
+
torchvision<0.19.0,>=0.15.0
|
|
12
|
+
torchaudio<2.4.0,>=2.0.0
|
|
13
|
+
librosa<0.11.0,>=0.10.0
|
|
14
|
+
soundfile>=0.12.1
|
|
15
|
+
flask>=2.0.0
|
|
16
|
+
tiktoken>=0.6.0
|
|
17
|
+
|
|
18
|
+
[audio-only]
|
|
19
|
+
sounddevice>=0.4.6
|
|
20
|
+
webrtcvad>=2.0.10
|
|
21
|
+
PyAudio>=0.2.13
|
|
22
|
+
soundfile>=0.12.1
|
|
23
|
+
|
|
24
|
+
[core-stt]
|
|
25
|
+
openai-whisper>=20230314
|
|
26
|
+
tiktoken>=0.6.0
|
|
27
|
+
|
|
28
|
+
[core-tts]
|
|
29
|
+
coqui-tts<0.30.0,>=0.27.0
|
|
30
|
+
torch<2.4.0,>=2.0.0
|
|
31
|
+
torchvision<0.19.0,>=0.15.0
|
|
32
|
+
torchaudio<2.4.0,>=2.0.0
|
|
33
|
+
librosa<0.11.0,>=0.10.0
|
|
34
|
+
|
|
35
|
+
[dev]
|
|
36
|
+
pytest>=7.0.0
|
|
37
|
+
black>=22.0.0
|
|
38
|
+
flake8>=5.0.0
|
|
39
|
+
|
|
40
|
+
[stt]
|
|
41
|
+
openai-whisper>=20230314
|
|
42
|
+
tiktoken>=0.6.0
|
|
43
|
+
|
|
44
|
+
[tts]
|
|
45
|
+
coqui-tts<0.30.0,>=0.27.0
|
|
46
|
+
torch<2.4.0,>=2.0.0
|
|
47
|
+
torchvision<0.19.0,>=0.15.0
|
|
48
|
+
torchaudio<2.4.0,>=2.0.0
|
|
49
|
+
librosa<0.11.0,>=0.10.0
|
|
50
|
+
|
|
51
|
+
[voice]
|
|
52
|
+
sounddevice>=0.4.6
|
|
53
|
+
webrtcvad>=2.0.10
|
|
54
|
+
PyAudio>=0.2.13
|
|
55
|
+
soundfile>=0.12.1
|
|
56
|
+
|
|
57
|
+
[voice-full]
|
|
58
|
+
sounddevice>=0.4.6
|
|
59
|
+
webrtcvad>=2.0.10
|
|
60
|
+
PyAudio>=0.2.13
|
|
61
|
+
openai-whisper>=20230314
|
|
62
|
+
coqui-tts<0.30.0,>=0.27.0
|
|
63
|
+
torch<2.4.0,>=2.0.0
|
|
64
|
+
torchvision<0.19.0,>=0.15.0
|
|
65
|
+
torchaudio<2.4.0,>=2.0.0
|
|
66
|
+
librosa<0.11.0,>=0.10.0
|
|
67
|
+
soundfile>=0.12.1
|
|
68
|
+
tiktoken>=0.6.0
|
|
69
|
+
|
|
70
|
+
[web]
|
|
71
|
+
flask>=2.0.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "abstractvoice"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "A modular Python library for voice interactions with AI systems"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -39,10 +39,11 @@ voice = [
|
|
|
39
39
|
|
|
40
40
|
# Text-to-Speech functionality
|
|
41
41
|
tts = [
|
|
42
|
-
"coqui-tts>=0.27.0",
|
|
43
|
-
"torch>=2.0.0",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
42
|
+
"coqui-tts>=0.27.0,<0.30.0",
|
|
43
|
+
"torch>=2.0.0,<2.4.0",
|
|
44
|
+
"torchvision>=0.15.0,<0.19.0",
|
|
45
|
+
"torchaudio>=2.0.0,<2.4.0",
|
|
46
|
+
"librosa>=0.10.0,<0.11.0",
|
|
46
47
|
]
|
|
47
48
|
|
|
48
49
|
# Speech-to-Text functionality
|
|
@@ -62,10 +63,11 @@ all = [
|
|
|
62
63
|
"webrtcvad>=2.0.10",
|
|
63
64
|
"PyAudio>=0.2.13",
|
|
64
65
|
"openai-whisper>=20230314",
|
|
65
|
-
"coqui-tts>=0.27.0",
|
|
66
|
-
"torch>=2.0.0",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
66
|
+
"coqui-tts>=0.27.0,<0.30.0",
|
|
67
|
+
"torch>=2.0.0,<2.4.0",
|
|
68
|
+
"torchvision>=0.15.0,<0.19.0",
|
|
69
|
+
"torchaudio>=2.0.0,<2.4.0",
|
|
70
|
+
"librosa>=0.10.0,<0.11.0",
|
|
69
71
|
"soundfile>=0.12.1",
|
|
70
72
|
"flask>=2.0.0",
|
|
71
73
|
"tiktoken>=0.6.0",
|
|
@@ -78,74 +80,42 @@ dev = [
|
|
|
78
80
|
"flake8>=5.0.0",
|
|
79
81
|
]
|
|
80
82
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
languages = [
|
|
83
|
+
# Complete voice functionality - TTS + STT + Audio I/O (most common use case)
|
|
84
|
+
voice-full = [
|
|
84
85
|
"sounddevice>=0.4.6",
|
|
85
86
|
"webrtcvad>=2.0.10",
|
|
86
87
|
"PyAudio>=0.2.13",
|
|
87
88
|
"openai-whisper>=20230314",
|
|
88
|
-
"coqui-tts>=0.27.0",
|
|
89
|
-
"torch>=2.0.0",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
89
|
+
"coqui-tts>=0.27.0,<0.30.0",
|
|
90
|
+
"torch>=2.0.0,<2.4.0",
|
|
91
|
+
"torchvision>=0.15.0,<0.19.0",
|
|
92
|
+
"torchaudio>=2.0.0,<2.4.0",
|
|
93
|
+
"librosa>=0.10.0,<0.11.0",
|
|
92
94
|
"soundfile>=0.12.1",
|
|
93
|
-
"flask>=2.0.0",
|
|
94
95
|
"tiktoken>=0.6.0",
|
|
95
96
|
]
|
|
96
97
|
|
|
97
|
-
#
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"torch>=2.0.0",
|
|
105
|
-
"torchaudio>=2.0.0",
|
|
106
|
-
"librosa>=0.10.0",
|
|
107
|
-
"soundfile>=0.12.1",
|
|
108
|
-
"flask>=2.0.0",
|
|
109
|
-
"tiktoken>=0.6.0",
|
|
110
|
-
]
|
|
111
|
-
es = [
|
|
112
|
-
"sounddevice>=0.4.6",
|
|
113
|
-
"webrtcvad>=2.0.10",
|
|
114
|
-
"PyAudio>=0.2.13",
|
|
115
|
-
"openai-whisper>=20230314",
|
|
116
|
-
"coqui-tts>=0.27.0",
|
|
117
|
-
"torch>=2.0.0",
|
|
118
|
-
"torchaudio>=2.0.0",
|
|
119
|
-
"librosa>=0.10.0",
|
|
120
|
-
"soundfile>=0.12.1",
|
|
121
|
-
"flask>=2.0.0",
|
|
122
|
-
"tiktoken>=0.6.0",
|
|
98
|
+
# Core TTS-only (lightweight, no STT)
|
|
99
|
+
core-tts = [
|
|
100
|
+
"coqui-tts>=0.27.0,<0.30.0",
|
|
101
|
+
"torch>=2.0.0,<2.4.0",
|
|
102
|
+
"torchvision>=0.15.0,<0.19.0",
|
|
103
|
+
"torchaudio>=2.0.0,<2.4.0",
|
|
104
|
+
"librosa>=0.10.0,<0.11.0",
|
|
123
105
|
]
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"PyAudio>=0.2.13",
|
|
106
|
+
|
|
107
|
+
# Core STT-only (lightweight, no TTS)
|
|
108
|
+
core-stt = [
|
|
128
109
|
"openai-whisper>=20230314",
|
|
129
|
-
"coqui-tts>=0.27.0",
|
|
130
|
-
"torch>=2.0.0",
|
|
131
|
-
"torchaudio>=2.0.0",
|
|
132
|
-
"librosa>=0.10.0",
|
|
133
|
-
"soundfile>=0.12.1",
|
|
134
|
-
"flask>=2.0.0",
|
|
135
110
|
"tiktoken>=0.6.0",
|
|
136
111
|
]
|
|
137
|
-
|
|
112
|
+
|
|
113
|
+
# Audio processing only (for custom TTS/STT implementations)
|
|
114
|
+
audio-only = [
|
|
138
115
|
"sounddevice>=0.4.6",
|
|
139
116
|
"webrtcvad>=2.0.10",
|
|
140
117
|
"PyAudio>=0.2.13",
|
|
141
|
-
"openai-whisper>=20230314",
|
|
142
|
-
"coqui-tts>=0.27.0",
|
|
143
|
-
"torch>=2.0.0",
|
|
144
|
-
"torchaudio>=2.0.0",
|
|
145
|
-
"librosa>=0.10.0",
|
|
146
118
|
"soundfile>=0.12.1",
|
|
147
|
-
"flask>=2.0.0",
|
|
148
|
-
"tiktoken>=0.6.0",
|
|
149
119
|
]
|
|
150
120
|
|
|
151
121
|
[project.urls]
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
numpy>=1.24.0
|
|
2
|
-
requests>=2.31.0
|
|
3
|
-
|
|
4
|
-
[all]
|
|
5
|
-
sounddevice>=0.4.6
|
|
6
|
-
webrtcvad>=2.0.10
|
|
7
|
-
PyAudio>=0.2.13
|
|
8
|
-
openai-whisper>=20230314
|
|
9
|
-
coqui-tts>=0.27.0
|
|
10
|
-
torch>=2.0.0
|
|
11
|
-
torchaudio>=2.0.0
|
|
12
|
-
librosa>=0.10.0
|
|
13
|
-
soundfile>=0.12.1
|
|
14
|
-
flask>=2.0.0
|
|
15
|
-
tiktoken>=0.6.0
|
|
16
|
-
|
|
17
|
-
[de]
|
|
18
|
-
sounddevice>=0.4.6
|
|
19
|
-
webrtcvad>=2.0.10
|
|
20
|
-
PyAudio>=0.2.13
|
|
21
|
-
openai-whisper>=20230314
|
|
22
|
-
coqui-tts>=0.27.0
|
|
23
|
-
torch>=2.0.0
|
|
24
|
-
torchaudio>=2.0.0
|
|
25
|
-
librosa>=0.10.0
|
|
26
|
-
soundfile>=0.12.1
|
|
27
|
-
flask>=2.0.0
|
|
28
|
-
tiktoken>=0.6.0
|
|
29
|
-
|
|
30
|
-
[dev]
|
|
31
|
-
pytest>=7.0.0
|
|
32
|
-
black>=22.0.0
|
|
33
|
-
flake8>=5.0.0
|
|
34
|
-
|
|
35
|
-
[es]
|
|
36
|
-
sounddevice>=0.4.6
|
|
37
|
-
webrtcvad>=2.0.10
|
|
38
|
-
PyAudio>=0.2.13
|
|
39
|
-
openai-whisper>=20230314
|
|
40
|
-
coqui-tts>=0.27.0
|
|
41
|
-
torch>=2.0.0
|
|
42
|
-
torchaudio>=2.0.0
|
|
43
|
-
librosa>=0.10.0
|
|
44
|
-
soundfile>=0.12.1
|
|
45
|
-
flask>=2.0.0
|
|
46
|
-
tiktoken>=0.6.0
|
|
47
|
-
|
|
48
|
-
[fr]
|
|
49
|
-
sounddevice>=0.4.6
|
|
50
|
-
webrtcvad>=2.0.10
|
|
51
|
-
PyAudio>=0.2.13
|
|
52
|
-
openai-whisper>=20230314
|
|
53
|
-
coqui-tts>=0.27.0
|
|
54
|
-
torch>=2.0.0
|
|
55
|
-
torchaudio>=2.0.0
|
|
56
|
-
librosa>=0.10.0
|
|
57
|
-
soundfile>=0.12.1
|
|
58
|
-
flask>=2.0.0
|
|
59
|
-
tiktoken>=0.6.0
|
|
60
|
-
|
|
61
|
-
[it]
|
|
62
|
-
sounddevice>=0.4.6
|
|
63
|
-
webrtcvad>=2.0.10
|
|
64
|
-
PyAudio>=0.2.13
|
|
65
|
-
openai-whisper>=20230314
|
|
66
|
-
coqui-tts>=0.27.0
|
|
67
|
-
torch>=2.0.0
|
|
68
|
-
torchaudio>=2.0.0
|
|
69
|
-
librosa>=0.10.0
|
|
70
|
-
soundfile>=0.12.1
|
|
71
|
-
flask>=2.0.0
|
|
72
|
-
tiktoken>=0.6.0
|
|
73
|
-
|
|
74
|
-
[languages]
|
|
75
|
-
sounddevice>=0.4.6
|
|
76
|
-
webrtcvad>=2.0.10
|
|
77
|
-
PyAudio>=0.2.13
|
|
78
|
-
openai-whisper>=20230314
|
|
79
|
-
coqui-tts>=0.27.0
|
|
80
|
-
torch>=2.0.0
|
|
81
|
-
torchaudio>=2.0.0
|
|
82
|
-
librosa>=0.10.0
|
|
83
|
-
soundfile>=0.12.1
|
|
84
|
-
flask>=2.0.0
|
|
85
|
-
tiktoken>=0.6.0
|
|
86
|
-
|
|
87
|
-
[stt]
|
|
88
|
-
openai-whisper>=20230314
|
|
89
|
-
tiktoken>=0.6.0
|
|
90
|
-
|
|
91
|
-
[tts]
|
|
92
|
-
coqui-tts>=0.27.0
|
|
93
|
-
torch>=2.0.0
|
|
94
|
-
torchaudio>=2.0.0
|
|
95
|
-
librosa>=0.10.0
|
|
96
|
-
|
|
97
|
-
[voice]
|
|
98
|
-
sounddevice>=0.4.6
|
|
99
|
-
webrtcvad>=2.0.10
|
|
100
|
-
PyAudio>=0.2.13
|
|
101
|
-
soundfile>=0.12.1
|
|
102
|
-
|
|
103
|
-
[web]
|
|
104
|
-
flask>=2.0.0
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|