Update app.py
Browse files
app.py
CHANGED
@@ -34,15 +34,13 @@ async def transcribe_audio(file: UploadFile = File(...)):
|
|
34 |
audio_bytes = await file.read()
|
35 |
audio_array, sampling_rate = librosa.load(io.BytesIO(audio_bytes), sr=processor.feature_extractor.sampling_rate)
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
torch.from_numpy(audio_array),
|
41 |
-
model,
|
42 |
-
return_seconds=True, # Return speech timestamps in seconds (default is samples)
|
43 |
-
)
|
44 |
-
|
45 |
-
print(speech_timestamps)
|
46 |
|
47 |
inputs = processor(
|
48 |
audio_array,
|
|
|
34 |
audio_bytes = await file.read()
|
35 |
audio_array, sampling_rate = librosa.load(io.BytesIO(audio_bytes), sr=processor.feature_extractor.sampling_rate)
|
36 |
|
37 |
+
# speech_timestamps = get_speech_timestamps(
|
38 |
+
# torch.from_numpy(audio_array),
|
39 |
+
# model,
|
40 |
+
# return_seconds=True, # Return speech timestamps in seconds (default is samples)
|
41 |
+
# )
|
42 |
|
43 |
+
# print(speech_timestamps)
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
inputs = processor(
|
46 |
audio_array,
|