Updates on detect-language

This commit is contained in:
McCloudS
2024-03-12 21:46:18 -06:00
committed by GitHub
parent e022cdbf78
commit c8d259420d

View File

@@ -348,6 +348,7 @@ def detect_language(
audio_file: UploadFile = File(...), audio_file: UploadFile = File(...),
#encode: bool = Query(default=True, description="Encode audio first through ffmpeg") # This is always false from Bazarr #encode: bool = Query(default=True, description="Encode audio first through ffmpeg") # This is always false from Bazarr
): ):
detected_lang_code = "" # Initialize with an empty string
try: try:
#give the 'process' a random name so mutliple Bazaar transcribes can operate at the same time. #give the 'process' a random name so mutliple Bazaar transcribes can operate at the same time.
random_name = random.choices("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", k=6) random_name = random.choices("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", k=6)