-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.py
More file actions
43 lines (33 loc) Β· 1.16 KB
/
quick_test.py
File metadata and controls
43 lines (33 loc) Β· 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python3
"""Quick validation test for optimized TTS system"""
import asyncio
import sys
from pathlib import Path
# Add parent directory to path
parent_dir = Path(__file__).parent
sys.path.insert(0, str(parent_dir))
async def test_system():
try:
from core.kokoro_tts import KokoroTTSEngine
print("π Testing optimized TTS system...")
tts = KokoroTTSEngine()
# Initialize
success = await tts.initialize()
if not success:
print("β Initialization failed")
return
print("β
TTS initialized successfully")
# Quick generation test
audio_file = await tts.generate_speech("Testing the optimized system!", "friendly")
if audio_file:
print(f"β
Speech generation successful: {audio_file}")
else:
print("β Speech generation failed")
return
# Cleanup
await tts.shutdown()
print("β
All systems working perfectly!")
except Exception as e:
print(f"β Error: {e}")
if __name__ == "__main__":
asyncio.run(test_system())