Spaces:
Runtime error
Runtime error
Ritwika-Das-Gupta
commited on
Rename grdio_audio_integration.py to app.py
Browse files
grdio_audio_integration.py → app.py
RENAMED
@@ -12,8 +12,8 @@ import numpy as np
|
|
12 |
from transformers import Wav2Vec2ForCTC, Wav2Vec2Tokenizer, AutoTokenizer, AutoModelForCausalLM
|
13 |
import soundfile as sf
|
14 |
import noisereduce as nr
|
15 |
-
import numpy as np
|
16 |
import librosa
|
|
|
17 |
|
18 |
# Load the models and tokenizers
|
19 |
model1 = Wav2Vec2ForCTC.from_pretrained("ai4bharat/indicwav2vec-hindi")
|
@@ -70,22 +70,9 @@ def find_last_sentence(text):
|
|
70 |
return text
|
71 |
|
72 |
|
73 |
-
|
74 |
-
# In[16]:
|
75 |
-
|
76 |
-
|
77 |
-
get_ipython().system('pip install noisereduce')
|
78 |
-
|
79 |
-
|
80 |
# In[76]:
|
81 |
|
82 |
|
83 |
-
import soundfile as sf
|
84 |
-
import librosa
|
85 |
-
import noisereduce as nr
|
86 |
-
import numpy as np
|
87 |
-
import gradio as gr
|
88 |
-
import pyloudnorm as pyln
|
89 |
|
90 |
def spectral_subtraction(audio_data, sample_rate):
|
91 |
# Compute short-time Fourier transform (STFT)
|
|
|
12 |
from transformers import Wav2Vec2ForCTC, Wav2Vec2Tokenizer, AutoTokenizer, AutoModelForCausalLM
|
13 |
import soundfile as sf
|
14 |
import noisereduce as nr
|
|
|
15 |
import librosa
|
16 |
+
import pyloudnorm as pyln
|
17 |
|
18 |
# Load the models and tokenizers
|
19 |
model1 = Wav2Vec2ForCTC.from_pretrained("ai4bharat/indicwav2vec-hindi")
|
|
|
70 |
return text
|
71 |
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
# In[76]:
|
74 |
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
def spectral_subtraction(audio_data, sample_rate):
|
78 |
# Compute short-time Fourier transform (STFT)
|