Spaces:
Runtime error
Runtime error
romsyflux
commited on
Commit
•
859b594
1
Parent(s):
1479f5d
Test removing waveform_tensor and using data as input
Browse files
app.py
CHANGED
@@ -200,13 +200,14 @@ def align_timestamps(segments, dia_seg_last_end):
|
|
200 |
|
201 |
def transcribe_diarize(audio):
|
202 |
sr, data = audio
|
203 |
-
processed_data = np.array(data).astype(np.float32) / 32767.0
|
204 |
-
waveform_tensor = torch.tensor(processed_data[np.newaxis, :])
|
205 |
|
206 |
transcription_res = transcribe(sr, data)
|
207 |
# results from the diarization pipeline
|
208 |
diarization_res = diarization_pipeline(
|
209 |
-
|
|
|
210 |
)
|
211 |
dia_seg, dia_label = [], []
|
212 |
for segment, _, label in diarization_res.itertracks(yield_label=True):
|
|
|
200 |
|
201 |
def transcribe_diarize(audio):
|
202 |
sr, data = audio
|
203 |
+
#processed_data = np.array(data).astype(np.float32) / 32767.0
|
204 |
+
#waveform_tensor = torch.tensor(processed_data[np.newaxis, :])
|
205 |
|
206 |
transcription_res = transcribe(sr, data)
|
207 |
# results from the diarization pipeline
|
208 |
diarization_res = diarization_pipeline(
|
209 |
+
#Test directly with processed_data {"waveform": waveform_tensor, "sample_rate": sr}
|
210 |
+
{"waveform": data, "sample_rate": sr}
|
211 |
)
|
212 |
dia_seg, dia_label = [], []
|
213 |
for segment, _, label in diarization_res.itertracks(yield_label=True):
|