Enhance file selection to support additional audio format (M4A) and update README.md to reflect new supported formats for video and audio recordings.

This commit is contained in:
Your Name
2025-08-05 11:18:36 -04:00
parent 3346b0df0f
commit f04853eba9
7 changed files with 203 additions and 16 deletions

View File

@ -51,8 +51,9 @@ def transcribe_audio(audio_path: Path, model=WHISPER_MODEL, use_cache=True, cach
logger.info(f"Using cached transcription for {audio_path}")
return cached_data.get("segments", []), cached_data.get("transcript", "")
# Extract audio if the input is a video file
if audio_path.suffix.lower() in ['.mp4', '.avi', '.mov', '.mkv']:
# Extract audio if the input is a video file (M4A is already audio)
video_extensions = ['.mp4', '.avi', '.mov', '.mkv']
if audio_path.suffix.lower() in video_extensions:
audio_path = extract_audio(audio_path)
# Configure GPU if available and requested