Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,6 @@ import os
|
|
14 |
import time
|
15 |
import demucs.api
|
16 |
|
17 |
-
os.environ["GRADIO_TEMP_DIR"] = "/home/yoach/spaces/tmp"
|
18 |
|
19 |
|
20 |
MODEL_NAME = "openai/whisper-large-v3"
|
@@ -190,7 +189,6 @@ def naive_postprocess_whisper_chunks(chunks, audio_array, sampling_rate, stop_c
|
|
190 |
|
191 |
text = current_chunk["text"]
|
192 |
|
193 |
-
print("new audio", begin/sampling_rate, end/sampling_rate)
|
194 |
|
195 |
chunk_to_concat = [audio_array[begin:end]]
|
196 |
while chunks and (text[-1] not in stop_chars or (current_dur<min_duration)):
|
@@ -205,9 +203,7 @@ def naive_postprocess_whisper_chunks(chunks, audio_array, sampling_rate, stop_c
|
|
205 |
# TODO: add silence ?
|
206 |
chunk_to_concat.append(audio_array[begin:end])
|
207 |
|
208 |
-
|
209 |
-
print(ch["timestamp"])
|
210 |
-
|
211 |
new_chunks.append({
|
212 |
"text": text.strip(),
|
213 |
"audio": np.concatenate(chunk_to_concat),
|
|
|
14 |
import time
|
15 |
import demucs.api
|
16 |
|
|
|
17 |
|
18 |
|
19 |
MODEL_NAME = "openai/whisper-large-v3"
|
|
|
189 |
|
190 |
text = current_chunk["text"]
|
191 |
|
|
|
192 |
|
193 |
chunk_to_concat = [audio_array[begin:end]]
|
194 |
while chunks and (text[-1] not in stop_chars or (current_dur<min_duration)):
|
|
|
203 |
# TODO: add silence ?
|
204 |
chunk_to_concat.append(audio_array[begin:end])
|
205 |
|
206 |
+
|
|
|
|
|
207 |
new_chunks.append({
|
208 |
"text": text.strip(),
|
209 |
"audio": np.concatenate(chunk_to_concat),
|