Spaces:
Runtime error
Runtime error
File size: 1,073 Bytes
3b07320 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
import json
from typing import Any
VIDEO_INFO = [
"id",
"channel",
"channel_id",
"title",
"categories",
"tags",
"description"
]
TRANSCRIPT_INFO = [
"text",
"segments"
]
SEGMENTS_INFO = [
"start",
"end",
"text"
]
AUDIO_FILES = [
".webm",
".mp3",
".flac",
".wav",
".m4a"
]
YT_OPTIONS = {
"format": "bestaudio/best",
"extractaudio": True,
"audioformat": "mp3",
"yesplaylist": True,
"postprocessors": [{
"key": "FFmpegExtractAudio",
"preferredcodec": "mp3",
"preferredquality": "192",
}]
}
def json_dump(obj: Any, save_path: str) -> None:
with open(save_path, "w") as file:
json.dump(obj, file) |