---
title: Command line
order: 2
summary: Every bx-audio command and its options.
---

<!-- Generated by tools/generate-docs.bxs from the CLI. Do not edit. -->

`bx-audio` is installed by `install-bx-module bx-audio`, together with its bash tab completion. Without the installer the same commands run as `boxlang module:bxaudio <command>`. Paths are relative to the folder you run the command in. `bx-audio help <command>` prints the usage of one command.

| Command | What it does |
|---|---|
| [`info`](#info) | Show the format, length and level of a WAV or MP3 file |
| [`convert`](#convert) | Convert between WAV and MP3, and change the sample rate or channels |
| [`normalize`](#normalize) | Scale the peak of a file to a level in decibels |
| [`trim`](#trim) | Cut a section out of a file |
| [`loudness`](#loudness) | Measure the loudness in LUFS (EBU R128), the loudness range and the true peak |
| [`master`](#master) | Reach a loudness target with a true-peak ceiling, ready to publish |
| [`stretch`](#stretch) | Change the speed or fit the length, keeping the pitch |
| [`pitch`](#pitch) | Change the pitch, keeping the length |
| [`bpm`](#bpm) | Detect the tempo, and with --beats list where the beats fall |
| [`silence`](#silence) | List the silent stretches, or write a copy with the silence cut off both ends |
| [`waveform`](#waveform) | Draw the loudness of a file on one line, with block characters if you add --unicode |
| [`speak`](#speak) | Say a text with an open license voice, installing the engine and the voice the first time |
| [`voices`](#voices) | List voices with their licenses, what is installed, and why some are not offered |
| [`licenses`](#licenses) | Show the voice licenses and what each one asks of you |
| [`install`](#install) | Download a voice, or the speech engine every voice needs |
| [`remove`](#remove) | Delete a downloaded voice, or the speech engine |
| [`where`](#where) | Show where bx-audio keeps its downloads, and how much space they take |
| [`clean`](#clean) | Delete downloaded files to free space, after asking |
| [`play`](#play) | Play a file through the speakers |
| [`loopify`](#loopify) | Make a sound loop seamlessly by blending its end into its start |
| [`sprite`](#sprite) | Join sounds into one audio sprite with a Howler.js map next to it (named by file name) |
| [`ffmpeg`](#ffmpeg) | Show whether FFmpeg is available (OGG, Opus, AAC and video need it), or download it |
| [`probe`](#probe) | Describe any audio or video file: length, size, video and audio streams |
| [`mux`](#mux) | Put an audio file on a video, copying the picture without re-encoding |
| [`pieces`](#pieces) | List the example pieces of music you can render |
| [`render`](#render) | Synthesize an example piece to a WAV or MP3 file |
| [`explorer`](#explorer) | Start the web explorer on the BoxLang MiniServer |
| [`doctor`](#doctor) | Check that MP3, FFmpeg, audio output, the examples and the explorer will work here |
| [`version`](#version) | Show the module version |
| [`help`](#help) | Show this help |

## info

Show the format, length and level of a WAV or MP3 file.

```bash
bx-audio info <file>
```

## convert

Convert between WAV and MP3, and change the sample rate or channels.

```bash
bx-audio convert <in> <out> [--bitrate=N] [--bitDepth=16] [--sampleRate=N] [--channels=1|2]
```

## normalize

Scale the peak of a file to a level in decibels.

```bash
bx-audio normalize <in> <out> [--db=-1]
```

## trim

Cut a section out of a file.

```bash
bx-audio trim <in> <out> [--start=0] [--end=SECONDS]
```

## loudness

Measure the loudness in LUFS (EBU R128), the loudness range and the true peak.

```bash
bx-audio loudness <file>
```

## master

Reach a loudness target with a true-peak ceiling, ready to publish.

```bash
bx-audio master <in> <out> [--target=streaming|podcast|broadcast|-14] [--truePeak=-1] [--glue]
```

## stretch

Change the speed or fit the length, keeping the pitch.

```bash
bx-audio stretch <in> <out> --rate=1.1 | --seconds=30
```

## pitch

Change the pitch, keeping the length.

```bash
bx-audio pitch <in> <out> --semitones=2
```

## bpm

Detect the tempo, and with --beats list where the beats fall.

```bash
bx-audio bpm <file> [--beats]
```

## silence

List the silent stretches, or write a copy with the silence cut off both ends.

```bash
bx-audio silence <file> [--db=-50] [--min=0.3] [--trim=OUT]
```

## waveform

Draw the loudness of a file on one line, with block characters if you add --unicode.

```bash
bx-audio waveform <file> [--width=60] [--unicode]
```

## speak

Say a text with an open license voice, installing the engine and the voice the first time.

```bash
bx-audio speak <text> --voice=NAME [--out=FILE] [--file=TEXTFILE] [--speed=1] [--captions=FILE.srt|.vtt] [--no-install]
```

```text
  --voice=NAME         A voice id or short name (see `bx-audio voices`)
  --out=FILE           Where to write the audio: .wav, .mp3, .flac, or .ogg/.opus/.m4a with FFmpeg (default speech.wav)
  --file=TEXTFILE      Read the text from a file instead of the command line
  --speed=1            1 is the voice's own pace, 1.2 faster, 0.85 slower (0.25 to 4)
  --captions=FILE      Also write captions timed to the voice: .srt or .vtt
  --offset=0           Seconds added to every caption time
  --max-chars=80       Longest caption line
  --by-clause          Speak and time clause by clause (at commas), for more natural pauses and shorter captions
  --sentence-pause=0.35  --clause-pause=0.15  --paragraph-pause=0.8   Seconds of quiet between the pieces
  --no-install         Fail instead of downloading the engine or the voice

Giving captions, a pause or --by-clause speaks the text piece by piece. Without them the voice phrases the whole text itself.
```

## voices

List voices with their licenses, what is installed, and why some are not offered.

```bash
bx-audio voices [voice] [--lang=en_US] [--installed|--downloadable|--excluded|--all] [--license=ID]
```

```text
Without options it lists the voices you can use. Each row says whether it is installed or still to download.
  <voice>         Full details of one voice: license, what the license asks, size, training data, where it is stored
  --installed     Only voices on disk
  --downloadable  Only offered voices you have not downloaded yet
  --excluded      Voices that are NOT offered, each with the reason (license, GPL dictionary, several speakers, language)
  --all           Offered and excluded together
  --lang=en_US    One language (--lang=all is the default)
  --license=ID    One license, for example CC0-1.0 or Apache-2.0

See `bx-audio licenses` for what each license asks of you.
```

## licenses

Show the voice licenses and what each one asks of you.

```bash
bx-audio licenses
```

## install

Download a voice, or the speech engine every voice needs.

```bash
bx-audio install <voice|engine> [...]
```

## remove

Delete a downloaded voice, or the speech engine.

```bash
bx-audio remove <voice|engine> [...]
```

## where

Show where bx-audio keeps its downloads, and how much space they take.

```bash
bx-audio where
```

## clean

Delete downloaded files to free space, after asking.

```bash
bx-audio clean [engine|voices|ffmpeg|cache|all] [--yes]
```

## play

Play a file through the speakers.

```bash
bx-audio play <file> [--volume=1] [--output=speakers|null]
```

## loopify

Make a sound loop seamlessly by blending its end into its start.

```bash
bx-audio loopify <in> <out> [--crossfade=0.25]
```

## sprite

Join sounds into one audio sprite with a Howler.js map next to it (named by file name).

```bash
bx-audio sprite <out> <file> <file> ... [--gap=0.1]
```

## ffmpeg

Show whether FFmpeg is available (OGG, Opus, AAC and video need it), or download it.

```bash
bx-audio ffmpeg [status|install]
```

## probe

Describe any audio or video file: length, size, video and audio streams.

```bash
bx-audio probe <file>
```

## mux

Put an audio file on a video, copying the picture without re-encoding.

```bash
bx-audio mux <video> <audio> <out> [--keep-original] [--offset=0]
```

## pieces

List the example pieces of music you can render.

```bash
bx-audio pieces
```

## render

Synthesize an example piece to a WAV or MP3 file.

```bash
bx-audio render <piece> [--out=FILE] [--bars=N] [--bpm=N] ...
```

## explorer

Start the web explorer on the BoxLang MiniServer.

```bash
bx-audio explorer [--port=8080]
```

## doctor

Check that MP3, FFmpeg, audio output, the examples and the explorer will work here.

```bash
bx-audio doctor
```

## version

Show the module version.

```bash
bx-audio version
```

## help

Show this help.

```bash
bx-audio help [command]
```

