Spaces:
Running
Running
Update improved_voice_clone.py
Browse files- improved_voice_clone.py +4 -0
improved_voice_clone.py
CHANGED
|
@@ -11,6 +11,7 @@ import sys
|
|
| 11 |
from pathlib import Path
|
| 12 |
from scipy import signal
|
| 13 |
|
|
|
|
| 14 |
# Configure logging
|
| 15 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
| 16 |
logger = logging.getLogger("ImprovedVoiceCloner")
|
|
@@ -21,6 +22,9 @@ class ImprovedVoiceCloner:
|
|
| 21 |
Initialize the improved voice cloning system using XTTS-v2
|
| 22 |
"""
|
| 23 |
# Set device to GPU if specified or available
|
|
|
|
|
|
|
|
|
|
| 24 |
if device == "cuda":
|
| 25 |
self.use_gpu = torch.cuda.is_available()
|
| 26 |
if not self.use_gpu:
|
|
|
|
| 11 |
from pathlib import Path
|
| 12 |
from scipy import signal
|
| 13 |
|
| 14 |
+
|
| 15 |
# Configure logging
|
| 16 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
| 17 |
logger = logging.getLogger("ImprovedVoiceCloner")
|
|
|
|
| 22 |
Initialize the improved voice cloning system using XTTS-v2
|
| 23 |
"""
|
| 24 |
# Set device to GPU if specified or available
|
| 25 |
+
import warnings
|
| 26 |
+
warnings.filterwarnings("ignore", category=UserWarning)
|
| 27 |
+
warnings.filterwarnings("ignore", message=".*attention_mask.*")
|
| 28 |
if device == "cuda":
|
| 29 |
self.use_gpu = torch.cuda.is_available()
|
| 30 |
if not self.use_gpu:
|