Spaces:
Sleeping
Sleeping
Update logic.py
Browse files
logic.py
CHANGED
@@ -1,13 +1,11 @@
|
|
1 |
from phonemizer.separator import Separator
|
2 |
-
from phonemizer import phonemize
|
3 |
# from phonemizer.backend.espeak.wrapper import EspeakWrapper
|
4 |
from Levenshtein import distance as levenshtein_distance
|
5 |
|
6 |
import whisper
|
7 |
import torch
|
8 |
-
|
9 |
-
import os
|
10 |
-
os.system('apt-get install espeak-ng')
|
11 |
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
|
12 |
|
13 |
model = whisper.load_model("base.en", device=device)
|
|
|
1 |
from phonemizer.separator import Separator
|
2 |
+
from phonemizer import phonemize
|
3 |
# from phonemizer.backend.espeak.wrapper import EspeakWrapper
|
4 |
from Levenshtein import distance as levenshtein_distance
|
5 |
|
6 |
import whisper
|
7 |
import torch
|
8 |
+
|
|
|
|
|
9 |
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
|
10 |
|
11 |
model = whisper.load_model("base.en", device=device)
|