Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from datasets import load_dataset
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
#from transformers import pipeline
|
8 |
#from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
|
9 |
-
|
10 |
|
11 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
12 |
|
@@ -14,8 +14,11 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
14 |
asr_pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-100h", device=device)
|
15 |
|
16 |
# load text-to-speech checkpoint and speaker embeddings
|
17 |
-
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
18 |
-
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
|
|
|
|
|
|
19 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
20 |
|
21 |
#model = BarkModel.from_pretrained("suno/bark-small")
|
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
#from transformers import pipeline
|
8 |
#from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
|
9 |
+
from transformers import BarkModel, BarkProcessor
|
10 |
|
11 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
12 |
|
|
|
14 |
asr_pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-100h", device=device)
|
15 |
|
16 |
# load text-to-speech checkpoint and speaker embeddings
|
17 |
+
#processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
18 |
+
#model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
19 |
+
|
20 |
+
model = BarkModel.from_pretrained("suno/bark-small")
|
21 |
+
processor = BarkProcessor.from_pretrained("suno/bark-small")
|
22 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
23 |
|
24 |
#model = BarkModel.from_pretrained("suno/bark-small")
|