Spaces:
Runtime error
Runtime error
Commit
·
dcb8221
1
Parent(s):
5bfb431
Update app.py
Browse files
app.py
CHANGED
@@ -166,7 +166,7 @@ def Transcribe_V2(num_speakers, speaker_names, audio="temp_audio.wav"):
|
|
166 |
as_audio = AudioSegment.from_wav(audio)
|
167 |
DEMO_FILE = {'uri': 'blabal', 'audio': audio}
|
168 |
hparams = pipeline.parameters(instantiated=True)
|
169 |
-
hparams["segmentation"]["min_duration_off"] -= 0.
|
170 |
pipeline.instantiate(hparams)
|
171 |
if num_speakers:
|
172 |
dz = pipeline(DEMO_FILE, num_speakers=num_speakers)
|
@@ -175,6 +175,7 @@ def Transcribe_V2(num_speakers, speaker_names, audio="temp_audio.wav"):
|
|
175 |
with open(CreateFile(f"diarization_{audio}.txt"), "w") as text_file:
|
176 |
text_file.write(str(dz))
|
177 |
dz = open(CreateFile(f"diarization_{audio}.txt")).read().splitlines()
|
|
|
178 |
dzList = []
|
179 |
for l in dz:
|
180 |
start, end = tuple(re.findall('[0-9]+:[0-9]+:[0-9]+\.[0-9]+', string=l))
|
|
|
166 |
as_audio = AudioSegment.from_wav(audio)
|
167 |
DEMO_FILE = {'uri': 'blabal', 'audio': audio}
|
168 |
hparams = pipeline.parameters(instantiated=True)
|
169 |
+
hparams["segmentation"]["min_duration_off"] -= 0.25
|
170 |
pipeline.instantiate(hparams)
|
171 |
if num_speakers:
|
172 |
dz = pipeline(DEMO_FILE, num_speakers=num_speakers)
|
|
|
175 |
with open(CreateFile(f"diarization_{audio}.txt"), "w") as text_file:
|
176 |
text_file.write(str(dz))
|
177 |
dz = open(CreateFile(f"diarization_{audio}.txt")).read().splitlines()
|
178 |
+
print(dz)
|
179 |
dzList = []
|
180 |
for l in dz:
|
181 |
start, end = tuple(re.findall('[0-9]+:[0-9]+:[0-9]+\.[0-9]+', string=l))
|