Spaces:
Runtime error
Runtime error
salmanmapkar
commited on
Commit
·
5bcaa28
1
Parent(s):
61f5a06
Update app.py
Browse files
app.py
CHANGED
@@ -163,7 +163,7 @@ def Transcribe_V1(NumberOfSpeakers, SpeakerNames="", audio="temp_audio.wav"):
|
|
163 |
|
164 |
|
165 |
def Transcribe_V2(model, num_speakers, speaker_names, audio="temp_audio.wav"):
|
166 |
-
|
167 |
# embedding_model = SpeechBrainPretrainedSpeakerEmbedding("speechbrain/spkrec-ecapa-voxceleb")
|
168 |
|
169 |
embedding_model = SpeechBrainPretrainedSpeakerEmbedding(
|
@@ -269,9 +269,9 @@ def Transcribe_V2(model, num_speakers, speaker_names, audio="temp_audio.wav"):
|
|
269 |
if duration > 4 * 60 * 60:
|
270 |
return "Audio duration too long"
|
271 |
|
272 |
-
print(json.dumps(diarization(audio)))
|
273 |
result = model.transcribe(audio)
|
274 |
-
print(json.dumps(result))
|
275 |
|
276 |
segments = result["segments"]
|
277 |
|
|
|
163 |
|
164 |
|
165 |
def Transcribe_V2(model, num_speakers, speaker_names, audio="temp_audio.wav"):
|
166 |
+
model = whisper.load_model(model)
|
167 |
# embedding_model = SpeechBrainPretrainedSpeakerEmbedding("speechbrain/spkrec-ecapa-voxceleb")
|
168 |
|
169 |
embedding_model = SpeechBrainPretrainedSpeakerEmbedding(
|
|
|
269 |
if duration > 4 * 60 * 60:
|
270 |
return "Audio duration too long"
|
271 |
|
272 |
+
# print(json.dumps(diarization(audio)))
|
273 |
result = model.transcribe(audio)
|
274 |
+
# print(json.dumps(result))
|
275 |
|
276 |
segments = result["segments"]
|
277 |
|