Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,9 @@ import gradio as gr
|
|
2 |
import librosa
|
3 |
import soundfile as sf
|
4 |
import torch
|
5 |
-
import warnings
|
6 |
|
7 |
from transformers import Wav2Vec2Tokenizer, Wav2Vec2ForCTC
|
8 |
|
9 |
-
warnings.filterwarnings("ignore")
|
10 |
-
|
11 |
#load wav2vec2 tokenizer and model
|
12 |
# define speech-to-text function
|
13 |
def asr_transcript(audio_file, language):
|
|
|
2 |
import librosa
|
3 |
import soundfile as sf
|
4 |
import torch
|
|
|
5 |
|
6 |
from transformers import Wav2Vec2Tokenizer, Wav2Vec2ForCTC
|
7 |
|
|
|
|
|
8 |
#load wav2vec2 tokenizer and model
|
9 |
# define speech-to-text function
|
10 |
def asr_transcript(audio_file, language):
|