englissi commited on
Commit
1f036ab
ยท
verified ยท
1 Parent(s): c897ffe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,8 +2,11 @@ import gradio as gr
2
  import torch
3
  from transformers import pipeline
4
 
5
- # Hugging Face TTS ๋ชจ๋ธ ๋กœ๋“œ (๋ถˆ๊ฐ€๋ฆฌ์•„์–ด ๋ชจ๋ธ๋กœ ๋ณ€๊ฒฝ ํ•„์š”)
6
- tts = pipeline(task="text-to-speech", model="facebook/mms-tts-bul", device=0 if torch.cuda.is_available() else -1)
 
 
 
7
 
8
  # TTS ๋ณ€ํ™˜ ํ•จ์ˆ˜
9
  def tts_generate(text):
 
2
  import torch
3
  from transformers import pipeline
4
 
5
+ # Use a pipeline as a high-level helper
6
+ from transformers import pipeline
7
+
8
+ pipe = pipeline("automatic-speech-recognition", model="infinitejoy/wav2vec2-large-xls-r-300m-bulgarian")
9
+
10
 
11
  # TTS ๋ณ€ํ™˜ ํ•จ์ˆ˜
12
  def tts_generate(text):