{"record":{"id":"e1b484f2a82a09bd","repo":"langchain-ai/deepagents","slug":"ffmpeg-not-found-on-path-install-ffmpeg-to-enable","errorCode":null,"errorMessage":"ffmpeg not found on PATH; install ffmpeg to enable voice transcription.","messagePattern":"ffmpeg not found on PATH; install ffmpeg to enable voice transcription\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/talon/deepagents_talon/speech.py","lineNumber":300,"sourceCode":"                \"ffmpeg\",\n                \"-y\",\n                \"-i\",\n                str(path),\n                \"-ar\",\n                \"16000\",\n                \"-ac\",\n                \"1\",\n                \"-f\",\n                \"wav\",\n                str(output),\n            ],\n            capture_output=True,\n            timeout=120,\n            check=False,\n        )\n    except FileNotFoundError as exc:\n        msg = \"ffmpeg not found on PATH; install ffmpeg to enable voice transcription.\"\n        raise RuntimeError(msg) from exc\n    except subprocess.TimeoutExpired as exc:\n        msg = f\"ffmpeg timed out while converting {path}\"\n        raise RuntimeError(msg) from exc\n\n    if proc.returncode != 0:\n        stderr = proc.stderr.decode(\"utf-8\", errors=\"replace\")\n        msg = f\"ffmpeg conversion failed with exit code {proc.returncode}: {stderr}\"\n        raise RuntimeError(msg)\n    return output\n","sourceCodeStart":282,"sourceCodeEnd":310,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/talon/deepagents_talon/speech.py#L282-L310","documentation":"Local transcription first converts input audio to 16 kHz mono WAV using the `ffmpeg` binary resolved from PATH. When `subprocess.run(['ffmpeg', ...])` raises FileNotFoundError, the binary is missing and `_convert_to_wav` re-raises as this RuntimeError.","triggerScenarios":"Calling local voice transcription on a machine where ffmpeg is not installed or is not on the PATH of the process running Talon.","commonSituations":"Minimal Docker images and CI runners without ffmpeg; virtualenv/IDE launches with a stripped PATH that omits /usr/local/bin or Homebrew paths; deploying to a server after developing on a machine that had ffmpeg.","solutions":["Install ffmpeg (`apt-get install ffmpeg`, `brew install ffmpeg`, or a conda/pip ffmpeg distribution)","Confirm `which ffmpeg` succeeds in the same shell/user that runs the app","If launching from an IDE or service manager, explicitly add ffmpeg's directory to PATH"],"exampleFix":"# before\nDockerfile: FROM python:3.12-slim\n# after\nDockerfile: FROM python:3.12-slim\nRUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*","handlingStrategy":"validation","validationCode":"import shutil\nif shutil.which(\"ffmpeg\") is None:\n    raise SystemExit(\"ffmpeg not found on PATH; install it before enabling voice transcription\")","typeGuard":null,"tryCatchPattern":"try:\n    text = transcribe_local(path)\nexcept RuntimeError as exc:\n    if \"ffmpeg not found on PATH\" in str(exc):\n        text = \"\"  # or use a cloud transcription fallback\n    else:\n        raise","preventionTips":["Include ffmpeg in deployment images and check `shutil.which('ffmpeg')` at startup","Use feature detection before offering voice features in the UI","Keep the ffmpeg install step next to the media extra in setup docs"],"tags":["ffmpeg","voice","path","environment"],"backgroundTag":"binary-not-on-path","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}