Command line
Every bx-audio command and its options.
On this page
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 | Show the format, length and level of a WAV or MP3 file |
convert | Convert between WAV and MP3, and change the sample rate or channels |
normalize | Scale the peak of a file to a level in decibels |
trim | Cut a section out of a file |
loudness | Measure the loudness in LUFS (EBU R128), the loudness range and the true peak |
master | Reach a loudness target with a true-peak ceiling, ready to publish |
stretch | Change the speed or fit the length, keeping the pitch |
pitch | Change the pitch, keeping the length |
bpm | Detect the tempo, and with --beats list where the beats fall |
silence | List the silent stretches, or write a copy with the silence cut off both ends |
waveform | Draw the loudness of a file on one line, with block characters if you add --unicode |
speak | Say a text with an open license voice, installing the engine and the voice the first time |
voices | List voices with their licenses, what is installed, and why some are not offered |
licenses | Show the voice licenses and what each one asks of you |
install | Download a voice, or the speech engine every voice needs |
remove | Delete a downloaded voice, or the speech engine |
where | Show where bx-audio keeps its downloads, and how much space they take |
clean | Delete downloaded files to free space, after asking |
play | Play a file through the speakers |
loopify | Make a sound loop seamlessly by blending its end into its start |
sprite | Join sounds into one audio sprite with a Howler.js map next to it (named by file name) |
ffmpeg | Show whether FFmpeg is available (OGG, Opus, AAC and video need it), or download it |
probe | Describe any audio or video file: length, size, video and audio streams |
mux | Put an audio file on a video, copying the picture without re-encoding |
pieces | List the example pieces of music you can render |
render | Synthesize an example piece to a WAV or MP3 file |
explorer | Start the web explorer on the BoxLang MiniServer |
doctor | Check that MP3, FFmpeg, audio output, the examples and the explorer will work here |
version | Show the module version |
help | Show this help |
info
Show the format, length and level of a WAV or MP3 file.
bx-audio info <file>
convert
Convert between WAV and MP3, and change the sample rate or channels.
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.
bx-audio normalize <in> <out> [--db=-1]
trim
Cut a section out of a file.
bx-audio trim <in> <out> [--start=0] [--end=SECONDS]
loudness
Measure the loudness in LUFS (EBU R128), the loudness range and the true peak.
bx-audio loudness <file>
master
Reach a loudness target with a true-peak ceiling, ready to publish.
bx-audio master <in> <out> [--target=streaming|podcast|broadcast|-14] [--truePeak=-1] [--glue]
stretch
Change the speed or fit the length, keeping the pitch.
bx-audio stretch <in> <out> --rate=1.1 | --seconds=30
pitch
Change the pitch, keeping the length.
bx-audio pitch <in> <out> --semitones=2
bpm
Detect the tempo, and with --beats list where the beats fall.
bx-audio bpm <file> [--beats]
silence
List the silent stretches, or write a copy with the silence cut off both ends.
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.
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.
bx-audio speak <text> --voice=NAME [--out=FILE] [--file=TEXTFILE] [--speed=1] [--captions=FILE.srt|.vtt] [--no-install]
--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.
bx-audio voices [voice] [--lang=en_US] [--installed|--downloadable|--excluded|--all] [--license=ID]
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.
bx-audio licenses
install
Download a voice, or the speech engine every voice needs.
bx-audio install <voice|engine> [...]
remove
Delete a downloaded voice, or the speech engine.
bx-audio remove <voice|engine> [...]
where
Show where bx-audio keeps its downloads, and how much space they take.
bx-audio where
clean
Delete downloaded files to free space, after asking.
bx-audio clean [engine|voices|ffmpeg|cache|all] [--yes]
play
Play a file through the speakers.
bx-audio play <file> [--volume=1] [--output=speakers|null]
loopify
Make a sound loop seamlessly by blending its end into its start.
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).
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.
bx-audio ffmpeg [status|install]
probe
Describe any audio or video file: length, size, video and audio streams.
bx-audio probe <file>
mux
Put an audio file on a video, copying the picture without re-encoding.
bx-audio mux <video> <audio> <out> [--keep-original] [--offset=0]
pieces
List the example pieces of music you can render.
bx-audio pieces
render
Synthesize an example piece to a WAV or MP3 file.
bx-audio render <piece> [--out=FILE] [--bars=N] [--bpm=N] ...
explorer
Start the web explorer on the BoxLang MiniServer.
bx-audio explorer [--port=8080]
doctor
Check that MP3, FFmpeg, audio output, the examples and the explorer will work here.
bx-audio doctor
version
Show the module version.
bx-audio version
help
Show this help.
bx-audio help [command]