Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def youtube_url_to_text(url, model_id, language_choice):
|
|
22 |
"""
|
23 |
video_path = download_and_convert_to_mp3(url)
|
24 |
pipeline = SpeechToTextPipeline(model_id)
|
25 |
-
transcript = pipeline(audio_path=video_path,
|
26 |
|
27 |
return transcript, video_path
|
28 |
|
@@ -45,7 +45,6 @@ def speaker_diarization(url, model_id, num_speakers, min_speaker, max_speaker):
|
|
45 |
pipeline = ASRDiarizationPipeline.from_pretrained(
|
46 |
asr_model=model_id,
|
47 |
diarizer_model="pyannote/speaker-diarization",
|
48 |
-
use_auth_token="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",
|
49 |
chunk_length_s=30,
|
50 |
device="cuda",
|
51 |
)
|
|
|
22 |
"""
|
23 |
video_path = download_and_convert_to_mp3(url)
|
24 |
pipeline = SpeechToTextPipeline(model_id)
|
25 |
+
transcript = pipeline(audio_path=video_path, language=language_choice)
|
26 |
|
27 |
return transcript, video_path
|
28 |
|
|
|
45 |
pipeline = ASRDiarizationPipeline.from_pretrained(
|
46 |
asr_model=model_id,
|
47 |
diarizer_model="pyannote/speaker-diarization",
|
|
|
48 |
chunk_length_s=30,
|
49 |
device="cuda",
|
50 |
)
|