Initial commit: local video captioning and translation tool
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env
|
||||
load_dotenv()
|
||||
|
||||
# API Keys and tokens
|
||||
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
||||
|
||||
# Whisper ASR Settings
|
||||
DEFAULT_WHISPER_MODEL = "whisper-1"
|
||||
|
||||
# LLM Translation settings
|
||||
DEFAULT_OPENAI_MODEL = "gpt-4o-mini"
|
||||
|
||||
# Defaults
|
||||
DEFAULT_SOURCE_LANG = "en"
|
||||
DEFAULT_TARGET_LANG = "es"
|
||||
|
||||
# Target translation languages map
|
||||
SUPPORTED_LANGUAGES = {
|
||||
"en": "English",
|
||||
"es": "Spanish",
|
||||
"fr": "French",
|
||||
"de": "German",
|
||||
"it": "Italian",
|
||||
"pt": "Portuguese",
|
||||
"zh": "Chinese",
|
||||
"ja": "Japanese",
|
||||
"ar": "Arabic",
|
||||
"ru": "Russian"
|
||||
}
|
||||
|
||||
# Subtitle Visual Presets (ASS style rules for FFmpeg)
|
||||
SUBTITLE_PRESETS = {
|
||||
"default": "FontName=Helvetica,FontSize=20,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1,Shadow=1,MarginV=15",
|
||||
"yellow": "FontName=Helvetica,FontSize=22,PrimaryColour=&H0000FFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=1.5,Shadow=1,MarginV=15",
|
||||
"box": "FontName=Helvetica,FontSize=20,PrimaryColour=&H00FFFFFF,BackColour=&H80000000,BorderStyle=3,Outline=0,Shadow=0,MarginV=15",
|
||||
"clean": "FontName=Arial,FontSize=22,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=0.5,Shadow=0,MarginV=20"
|
||||
}
|
||||
DEFAULT_STYLE = "box"
|
||||
Reference in New Issue
Block a user