fix: resolve huggingface build failure by utilizing shijincai fork and removing torch from requirements
Browse files- app.py +7 -1
- requirements.txt +3 -2
app.py
CHANGED
|
@@ -8,7 +8,11 @@ import traceback
|
|
| 8 |
import numpy as np
|
| 9 |
import soundfile as sf
|
| 10 |
import re
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
try:
|
| 13 |
import pythoncom
|
| 14 |
except ImportError:
|
|
@@ -67,6 +71,8 @@ def sapi5_generate_wav(text: str, speaker_id: int, output_path: str):
|
|
| 67 |
use_com = False
|
| 68 |
|
| 69 |
try:
|
|
|
|
|
|
|
| 70 |
engine = pyttsx3.init()
|
| 71 |
voices = engine.getProperty('voices')
|
| 72 |
if len(voices) > 0:
|
|
|
|
| 8 |
import numpy as np
|
| 9 |
import soundfile as sf
|
| 10 |
import re
|
| 11 |
+
try:
|
| 12 |
+
import pyttsx3
|
| 13 |
+
except Exception as e:
|
| 14 |
+
pyttsx3 = None
|
| 15 |
+
print(f"[VibeVoice] Warning: pyttsx3 import failed: {e}")
|
| 16 |
try:
|
| 17 |
import pythoncom
|
| 18 |
except ImportError:
|
|
|
|
| 71 |
use_com = False
|
| 72 |
|
| 73 |
try:
|
| 74 |
+
if pyttsx3 is None:
|
| 75 |
+
raise Exception("pyttsx3 is not available")
|
| 76 |
engine = pyttsx3.init()
|
| 77 |
voices = engine.getProperty('voices')
|
| 78 |
if len(voices) > 0:
|
requirements.txt
CHANGED
|
@@ -2,10 +2,11 @@ fastapi>=0.100.0
|
|
| 2 |
uvicorn>=0.20.0
|
| 3 |
python-multipart>=0.0.6
|
| 4 |
soundfile>=0.12.1
|
| 5 |
-
torch>=2.0.0
|
| 6 |
transformers>=4.36.0
|
| 7 |
numpy>=1.20.0
|
| 8 |
websockets>=12.0
|
| 9 |
pyttsx3>=2.90
|
| 10 |
comtypes>=1.4.0; sys_platform == 'win32'
|
| 11 |
-
git+https://github.com/
|
|
|
|
|
|
|
|
|
| 2 |
uvicorn>=0.20.0
|
| 3 |
python-multipart>=0.0.6
|
| 4 |
soundfile>=0.12.1
|
|
|
|
| 5 |
transformers>=4.36.0
|
| 6 |
numpy>=1.20.0
|
| 7 |
websockets>=12.0
|
| 8 |
pyttsx3>=2.90
|
| 9 |
comtypes>=1.4.0; sys_platform == 'win32'
|
| 10 |
+
git+https://github.com/shijincai/VibeVoice.git
|
| 11 |
+
|
| 12 |
+
|