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.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.0.1 (2026) License: MIT License Repo: Praat AudioTools
Contents:

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.

Core idea: the same interface handles both sides of a Praat workflow. Audio can enter Praat from a folder, leave Praat from selected Sound objects, or pass through Praat as a memory-efficient batch conversion process.

Input → output

AUDIO FOLDER recursive discovery → format filter → alphabetical / random selection ↓ OPEN INTO PRAAT files become selected Sound objects SELECTED SOUND OBJECTS ↓ COPY → optional resample → optional TPDF dither → export ↓ original Sounds remain unchanged AUDIO FOLDER ↓ READ ONE FILE → optional resample → optional TPDF dither → export → remove ↓ NEXT FILE

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

  1. Run Universal_Audio_IO.praat.
  2. Choose Open audio folder into Praat.
  3. Choose an input-format filter, whether subfolders should be included, and whether to load all matching files or a limited subset.
  4. Choose the source folder when prompted.
  5. The loaded Sounds remain selected in the Objects window. If enabled, Audio_IO_Load_Report records the result.

Export selected Sounds

  1. Select one or more Sound objects.
  2. Run the script and choose Export selected Sound objects.
  3. Select the output format, sample rate, dither mode and destination folder.
  4. The script exports temporary working copies and restores the original Sound selection when finished.

Convert an audio folder

  1. Choose Convert audio folder.
  2. Set the folder-discovery controls and output settings.
  3. Choose the source folder when prompted.
  4. Each source file is read, converted, exported and removed before the next file is opened.

Three operations

OperationSourceResultObject behavior
Open audio folder into PraatRecursive folder scanSound objects in PraatLoaded Sounds remain open and are selected at the end.
Export selected Sound objectsOne or more selected SoundsAudio files in the chosen output folderOriginal Sounds are preserved; temporary working copies are removed.
Convert audio folderRecursive folder scanConverted audio files in the chosen output folderEach 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.

ControlDefaultMeaning
Input formatAll supported audioRestricts discovery to all supported formats, WAV, AIFF/AIFC, FLAC, MP3, AU/SND, or NIST.
Max files10Maximum number of readable files to open or convert when Use all matching files is off.
Use all matching filesOffProcesses every readable matching file rather than limiting the run to Max files.
Randomize selectionOnRandomizes 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 subfoldersOnRecursively scans nested folders. Recursion is capped internally at 64 levels.
Create reportOnCreates 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.

Readable files only. Paths are discovered first and then checked with Praat's file-readability test. Unreadable files are counted in the Info report and skipped.

Output formats

FormatPraat writer usedDither behavior
WAV 24-bitNative 24-bit WAV writerNo dither in Auto; TPDF can be forced.
WAV 16-bitStandard WAV writerTPDF in Auto.
WAV 32-bitNative 32-bit WAV writerNo custom dither.
AIFF 16-bitNative AIFF writerTPDF in Auto.
AIFC 16-bitNative AIFC writerTPDF in Auto.
FLAC 16-bitNative FLAC writerTPDF in Auto.
NeXT/Sun AU 16-bitNative NeXT/Sun writerTPDF in Auto.
NIST 16-bitNative NIST writerTPDF in Auto.
MP3 highest-quality VBRPraat native highest-quality VBR MP3 writerNo custom dither.
Recommended general-purpose master export: WAV 24-bit preserves substantially more integer resolution than 16-bit while remaining widely compatible. The tool therefore uses WAV 24-bit as its default output format.

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.

SOURCE SOUND ↓ Praat sinc resampling, precision 50 ↓ OPTIONAL TPDF DITHER ↓ INTEGER / COMPRESSED FILE WRITER

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.

dither = U(-0.5, 0.5) + U(-0.5, 0.5) 16-bit LSB = 1 / 32768 24-bit LSB = 1 / 8388608 output sample = sample + dither × LSB
ModeBehavior
Auto (recommended)Applies TPDF to 16-bit output only.
NoneNo custom dither is added.
TPDFForces TPDF for 16-bit output and can also apply it to 24-bit WAV.
No dither for MP3 or 32-bit WAV. The script deliberately bypasses the custom dither stage for these outputs.

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.

OperationTableRecorded information
Open folderAudio_IO_Load_ReportLoad index, source path, object name, duration, channel count and source sample rate.
Export selected SoundsAudio_IO_Export_ReportObject name, source rate, output path, target format, realized target rate and dither status.
Convert folderAudio_IO_Conversion_ReportSource 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:

Large collections: folder conversion is the preferred mode when the goal is format/sample-rate conversion rather than interactive work with the files inside Praat.

Notes & limitations