Recursive WAV Opener — User Guide
A utility script to recursively search and load all .wav files from a selected folder and all its subdirectories into the Praat Objects window.
What this does
This script is a powerful utility for batch-loading audio files into Praat. Unlike Praat's native "Read from file" command, this script uses a recursive search function to find and load every single .wav file (case-insensitive) contained within a specified root directory and any number of its subfolders. This is particularly useful when dealing with large, multi-level datasets.
The script only loads files and outputs a log of its progress to the Praat Info window; it does not perform any analysis.
Quick start
- Run the script: Praat → Run script… →
Recursive WAV opener.praat. - A dialog box will appear prompting you to Select folder containing .wav files. Navigate to and select your desired root folder (the folder that contains all the WAV files, possibly in subfolders).
- Click OK. The script will immediately begin searching and loading files.
- All discovered
.wavfiles will appear as Sound objects in the Praat Objects window.
Implementation Details
Analysis Steps
The script's core function is handled by a recursive procedure:
- Folder Selection: The script uses the Praat command
chooseDirectory$to get the root path from the user. - Path Sanitization: It ensures the selected directory path ends with a forward slash (
/) for reliable cross-platform compatibility. - The Recursive Procedure: A procedure named
openWavFilesis defined to:- Find all
.wavfiles (case-insensitive usingfileNames_caseInsensitive$#) in the current directory. - Load each found file using
Read from file:. - Find all subfolders (using
folderNames$#). - Call itself (recurse) for each subfolder found, appending the subfolder name to the path.
- Find all
Fixed Analysis Parameters
The functionality relies on the following fixed parameters/behavior:
| Parameter | Value | Description |
|---|---|---|
| File Type | *.wav | Only files with the .wav extension are loaded. |
| Case Sensitivity | No | The search for .wav files is case-insensitive. |
| Loading Mechanism | Read from file | All loaded files become individual Sound objects in the Praat Objects window. |
| Search Depth | Unlimited | The script recurses into all subfolders, regardless of depth. |