Hecheng0625
commited on
Commit
•
386bae1
1
Parent(s):
de40063
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import torch
|
|
3 |
import safetensors
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
import soundfile as sf
|
|
|
6 |
|
7 |
import numpy as np
|
8 |
import librosa
|
@@ -18,7 +19,8 @@ from transformers import SeamlessM4TFeatureExtractor
|
|
18 |
|
19 |
processor = SeamlessM4TFeatureExtractor.from_pretrained("facebook/w2v-bert-2.0")
|
20 |
|
21 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "
|
|
|
22 |
|
23 |
|
24 |
def g2p_(text, language):
|
|
|
3 |
import safetensors
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
import soundfile as sf
|
6 |
+
import os
|
7 |
|
8 |
import numpy as np
|
9 |
import librosa
|
|
|
19 |
|
20 |
processor = SeamlessM4TFeatureExtractor.from_pretrained("facebook/w2v-bert-2.0")
|
21 |
|
22 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "CPU"
|
23 |
+
|
24 |
|
25 |
|
26 |
def g2p_(text, language):
|