Spaces:
Running
Running
Daniel Amendoeira
commited on
Update tools.py
Browse files
tools.py
CHANGED
@@ -81,7 +81,7 @@ def transcribe_youtube(youtube_url: str) -> str:
|
|
81 |
transcript = youtube_api.fetch(video_id)
|
82 |
|
83 |
# keep only text
|
84 |
-
|
85 |
-
return
|
86 |
except Exception as e:
|
87 |
return f"transcribe_youtube failed: {e}"
|
|
|
81 |
transcript = youtube_api.fetch(video_id)
|
82 |
|
83 |
# keep only text
|
84 |
+
text = '\n'.join([s.text for s in transcript.snippets])
|
85 |
+
return text
|
86 |
except Exception as e:
|
87 |
return f"transcribe_youtube failed: {e}"
|