Skip to main content

Convert

Converts an audio file from one format to another with optional frame rate and channel configuration.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Source Path - Path to the source audio file to convert.
  • Destination Path - Path where the converted audio file will be saved. The file extension determines the output format.

Options

  • Frame Rate - Optional frame rate (sample rate) for the converted audio in Hz (e.g., 44100, 48000).
  • Number of Channels - Optional number of audio channels (1 for mono, 2 for stereo).

Output

This node does not produce output variables. The converted file is saved directly to the destination path.

How It Works

The Convert node uses the PyDub library (powered by FFmpeg) to convert audio files between formats. When executed, the node:

  1. Validates the source file path and checks if the file exists
  2. Validates the destination file path
  3. Loads the source audio file
  4. Applies frame rate conversion if specified
  5. Applies channel conversion if specified
  6. Detects the output format from the destination file extension
  7. Exports the converted audio to the destination path

Requirements

  • Valid source audio file at the specified path
  • Destination path must be writable
  • FFmpeg must be installed (included with the package)
  • Supported audio format for both input and output

Supported Formats

The node supports all formats handled by FFmpeg, including:

  • MP3 (.mp3)
  • WAV (.wav)
  • MP4 Audio (.mp4, .m4a)
  • OGG Vorbis (.ogg)
  • Windows Media Audio (.wma)
  • AAC (.aac)
  • FLAC (.flac)
  • And many more

Error Handling

The node will return specific errors in the following cases:

  • Source path is not a valid string
  • Source file does not exist at the specified path
  • Destination path is not a valid string
  • Invalid frame rate value
  • Invalid number of channels value
  • Unsupported audio format

Usage Examples

Example 1: Basic Format Conversion

Convert an MP3 file to WAV format:

  1. Set Source Path to C:\audio\input.mp3
  2. Set Destination Path to C:\audio\output.wav
  3. Leave optional fields empty for default settings

Example 2: Convert to Mono Audio

Convert stereo audio to mono:

  1. Set Source Path to C:\audio\stereo.mp3
  2. Set Destination Path to C:\audio\mono.mp3
  3. Set Number of Channels to 1

Example 3: Change Sample Rate

Convert audio to standard CD quality (44.1 kHz):

  1. Set Source Path to C:\audio\input.wav
  2. Set Destination Path to C:\audio\output.wav
  3. Set Frame Rate to 44100

Example 4: Complete Audio Standardization

Convert to MP3 with specific quality settings:

  1. Set Source Path to C:\audio\input.wav
  2. Set Destination Path to C:\audio\output.mp3
  3. Set Frame Rate to 44100
  4. Set Number of Channels to 2 (stereo)

Usage Notes

  • The output format is automatically detected from the file extension in the Destination Path
  • If frame rate is not specified, the original sample rate is preserved
  • If channels are not specified, the original channel configuration is preserved
  • Converting from lossy to lossless formats (e.g., MP3 to WAV) won't improve quality
  • Converting to mono (1 channel) reduces file size but loses stereo information
  • Higher frame rates increase file size but may improve quality
  • Common frame rates: 8000 (telephone), 44100 (CD), 48000 (professional), 96000 (high-res)
  • Converting between formats may take time depending on file size and complexity

Performance Tips

  • Convert to compressed formats (MP3, OGG) to reduce file size
  • Use lower frame rates (22050) for voice recordings to save space
  • Batch convert files by using loops in your flow
  • Keep source files in lossless formats (WAV, FLAC) for archival

Common Use Cases

  • Converting podcast recordings to MP3 for distribution
  • Standardizing audio files to a consistent format
  • Reducing file sizes by converting to compressed formats
  • Preparing audio for specific platforms (web, mobile, broadcast)
  • Converting mono recordings to stereo format
  • Downsampling high-resolution audio for web use
  • Creating phone-quality audio (8 kHz mono) for IVR systems
  • Converting legacy audio formats to modern standards

Best Practices

  • Always verify the source file exists before conversion
  • Use appropriate sample rates for your use case:
    • 8000 Hz for telephone quality
    • 22050 Hz for voice/podcasts
    • 44100 Hz for music/CD quality
    • 48000 Hz for video/professional use
  • Choose the right format:
    • WAV for lossless quality (large files)
    • MP3 for good quality with smaller size
    • OGG for open-source alternatives
    • AAC for iOS/Apple ecosystem
  • Back up original files before batch conversions
  • Test conversion settings with a sample file first