Universal Audio I/O — User Guide
Open recursive audio folders into Praat, export selected Sound objects, or convert large audio collections one file at a time with format conversion, sample-rate conversion and optional TPDF dither.
What this does
Universal Audio I/O combines three related file-handling tasks in one native Praat utility. It can recursively discover audio files and open them as Sound objects, export one or more Sounds already selected in the Objects window, or convert a folder of files directly to a new format without leaving the source Sounds open.
The tool replaces the earlier recursive WAV-opening workflow while retaining its corpus-oriented behavior: recursive discovery, alphabetical or randomized selection, file limits, load reports and automatic selection of newly opened Sounds.
Input → output
The three paths share the same format and conversion logic but differ in object lifetime. Folder conversion is deliberately streamed one file at a time so a large corpus does not fill the Praat Objects window or remain resident in memory.
Quick start
Open an audio folder
- Run
Universal_Audio_IO.praat. - Choose Open audio folder into Praat.
- Choose an input-format filter, whether subfolders should be included, and whether to load all matching files or a limited subset.
- Choose the source folder when prompted.
- The loaded Sounds remain selected in the Objects window. If enabled,
Audio_IO_Load_Reportrecords the result.
Export selected Sounds
- Select one or more Sound objects.
- Run the script and choose Export selected Sound objects.
- Select the output format, sample rate, dither mode and destination folder.
- The script exports temporary working copies and restores the original Sound selection when finished.
Convert an audio folder
- Choose Convert audio folder.
- Set the folder-discovery controls and output settings.
- Choose the source folder when prompted.
- Each source file is read, converted, exported and removed before the next file is opened.
Three operations
| Operation | Source | Result | Object behavior |
|---|---|---|---|
| Open audio folder into Praat | Recursive folder scan | Sound objects in Praat | Loaded Sounds remain open and are selected at the end. |
| Export selected Sound objects | One or more selected Sounds | Audio files in the chosen output folder | Original Sounds are preserved; temporary working copies are removed. |
| Convert audio folder | Recursive folder scan | Converted audio files in the chosen output folder | Each source Sound is temporary and is removed before the next file is processed. |
Folder discovery
The two folder-based modes use the same recursive scanner. The source folder is chosen only after the main form is accepted.
| Control | Default | Meaning |
|---|---|---|
| Input format | All supported audio | Restricts discovery to all supported formats, WAV, AIFF/AIFC, FLAC, MP3, AU/SND, or NIST. |
| Max files | 10 | Maximum number of readable files to open or convert when Use all matching files is off. |
| Use all matching files | Off | Processes every readable matching file rather than limiting the run to Max files. |
| Randomize selection | On | Randomizes the discovered path list before choosing the limited subset. With this off, the first N readable files are taken from the alphabetically sorted list. |
| Include subfolders | On | Recursively scans nested folders. Recursion is capped internally at 64 levels. |
| Create report | On | Creates a Praat Table describing the files loaded, exported or converted. |
Supported folder input
The recursive scanner recognizes .wav, .aif, .aiff, .aifc, .flac, .mp3, .au, .snd and .nist.
Output formats
| Format | Praat writer used | Dither behavior |
|---|---|---|
| WAV 24-bit | Native 24-bit WAV writer | No dither in Auto; TPDF can be forced. |
| WAV 16-bit | Standard WAV writer | TPDF in Auto. |
| WAV 32-bit | Native 32-bit WAV writer | No custom dither. |
| AIFF 16-bit | Native AIFF writer | TPDF in Auto. |
| AIFC 16-bit | Native AIFC writer | TPDF in Auto. |
| FLAC 16-bit | Native FLAC writer | TPDF in Auto. |
| NeXT/Sun AU 16-bit | Native NeXT/Sun writer | TPDF in Auto. |
| NIST 16-bit | Native NIST writer | TPDF in Auto. |
| MP3 highest-quality VBR | Praat native highest-quality VBR MP3 writer | No custom dither. |
Sample-rate conversion
Sample-rate conversion is optional. Keep original preserves the source sampling frequency; otherwise the Sound is resampled before dither and export.
Available target rates are 16, 22.05, 24, 32, 44.1, 48, 88.2, 96, 176.4 and 192 kHz. Resampling uses Praat's native Resample command with precision 50.
The script skips the resampling stage when the requested target rate is already effectively equal to the source rate.
MP3 sample rates
For MP3 output, the script accepts 16, 22.05, 24, 32, 44.1 and 48 kHz. If Keep original is selected, a source outside this set is refused with an explanatory message rather than being silently converted.
Dither
The tool implements triangular probability density function (TPDF) dither directly in the temporary Sound before integer export. Dither is added after any requested resampling and immediately before the file is written.
| Mode | Behavior |
|---|---|
| Auto (recommended) | Applies TPDF to 16-bit output only. |
| None | No custom dither is added. |
| TPDF | Forces TPDF for 16-bit output and can also apply it to 24-bit WAV. |
Naming & overwrite safety
The output basename is the Praat Sound name plus the optional Filename suffix. The selected output extension is then appended.
sourceName + filename_suffix + extension
When Overwrite existing files is off, an existing destination is never replaced. The script appends an incrementing suffix:
voice.wav
voice_1.wav
voice_2.wav
When overwrite is enabled, the selected destination path is written directly.
Reports
With Create report enabled, each operation leaves a Praat Table containing the most relevant source and output metadata.
| Operation | Table | Recorded information |
|---|---|---|
| Open folder | Audio_IO_Load_Report | Load index, source path, object name, duration, channel count and source sample rate. |
| Export selected Sounds | Audio_IO_Export_Report | Object name, source rate, output path, target format, realized target rate and dither status. |
| Convert folder | Audio_IO_Conversion_Report | Source path, object name, duration, channels, source rate, output path, target format, realized target rate and dither status. |
The Info window also reports discovery counts, unreadable paths, selection mode, conversion totals, resampled-file count, dithered-file count and destination folder.
Memory behavior
The distinction between Open and Convert is intentional:
- Open audio folder into Praat is a corpus-ingestion tool. The loaded Sounds remain available for analysis, editing and later AudioTools processing.
- Export selected Sound objects protects the selected sources by processing temporary copies.
- Convert audio folder is a streaming file-conversion workflow. Only one source Sound is required at a time, and it is removed immediately after its output has been written.
Notes & limitations
- Native Praat only. The tool does not require Python, FFmpeg or an external converter. MP3 output uses Praat's native highest-quality VBR writer.
- Folder hierarchy is not reproduced. Converted files are written into the single selected output folder. Source subfolder structure is not recreated.
- Object names drive output names. In folder conversion, the Sound name created by Praat becomes the output basename. Name collisions are resolved with
_1,_2, and so on when overwrite is disabled. - 32-bit WAV is the Praat 32-bit integer writer used by this script. It should not be described as an IEEE 32-bit floating-point WAV export.
- Dither is explicit. Auto is designed for the common reduction to 16-bit. Select None when a deliberately undithered integer export is required.
- MP3 rate checking is conservative. The script limits MP3 output to the standard rates explicitly listed in the interface logic.
- Recursive depth is bounded. Folder traversal stops beyond 64 nested levels and reports skipped deep folders in the Info window.
- No source modification. Export mode works on copies. Folder conversion removes only temporary Sounds created from source files; it does not alter the source files on disk.