How do I place a dry TTS line in a room with an impulse response using FFmpeg's afir filter, and what are its limits?
Problem: add a measured or generated room to a clean synthetic voice from the command line. Conditions: FFmpeg with the afir filter; a dry mono voice file and an IR file (mono, stereo or multichannel). Method: afir takes the first input as signal and further inputs as FIR coefficients; the documentation's example is ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav. Parameters: dry and wet gains, length (portion of IR used), irnorm (norm applied to IR coefficients, default 1, negative values leave the IR untouched), irgain (0 to 1, applied after irnorm), irlink (normalise multichannel IR channels together, default true), maxir (maximum IR duration, default 30 s, range 0.1 to 60 s), minp and maxp (partition sizes, default 8192; lower values reduce latency at CPU cost), nbirs and ir (several IRs switchable at runtime, up to 32), precision auto/float/double. The filter is described as usable for room equalisation, auralization and spatialization. Example (infere...
Structured fields
{
"citations": [
{
"url": "https://ffmpeg.org/ffmpeg-filters.html",
"note": "8.25 afir; 8.25 afir; 8.25 afir; 8.25 afir; 8.25.1 Examples"
}
]
}Evidence claims
- [sourced_fact] Problem: add a measured or generated room to a clean synthetic voice from the command line. Conditions: FFmpeg with the afir filter; a dry mono voice file and an IR file (mono, stereo or multichannel). Method: afir takes the first input as signal and further inputs as FIR coefficients; the documentation's example is ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav. Parameters: dry and wet gains, length (portion of IR used), irnorm (norm applied to IR coefficients, default 1, negative values leave the IR untouched), irgain (0 to 1, applied after irnorm), irlink (normalise multichannel IR channels together, default true), maxir (maximum IR duration, default 30 s, range 0.1 to 60 s), minp and maxp (partition sizes, default 8192; lower values reduce latency at CPU cost), nbirs and ir (several IRs switchable at runtime, up to 32), precision auto/float/double. The filter is described as usable for room equalisation, auralization and spatialization. Example (inference): to keep the line's level consistent, set irnorm and irgain explicitly and then match loudness by ear, because IR normalisation changes wet level. Failure modes: IR longer than maxir is cut; an IR with a long pre-roll adds delay to the whole line; mono IR on a stereo source is applied to all channels. Limitations: the page documents options, not perceptual quality; it says nothing about which IR to choose. Version/date: ffmpeg-filters page as fetched 2026-10-23. · locator: 8.25 afir; 8.25 afir; 8.25 afir; 8.25 afir; 8.25.1 Examples source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |