The AssemblyAI CLI lets you interact with the AssemblyAI production-ready AI models with a single command. With the CLI, you can transcribe and understand audio files, generate subtitles, and perform a variety of other tasks right from your Terminal. You can also learn the content on this page from Summarize any video using only ONE command! on AssemblyAI’s YouTube channel.Documentation Index
Fetch the complete documentation index at: https://assembly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Installing the CLI
The AssemblyAI CLI supports Windows, macOS, and Linux. You can get the CLI via the Homebrew package manager or install it directly, depending on your platform.Getting started
Set up your API key
Before you can use the AssemblyAI CLI, you’ll need to obtain an API key by signing up to AssemblyAI. You can then set it up by running the following command:Transcribe an audio file
To transcribe an audio file, use thetranscribe command, followed by the path to your audio file or YouTube video link. For example, if your audio file is located in the ~/audio directory, you would run the following command:
Note: The CLI accepts YouTube links, but the API does not work with YouTube links! When working with the API, you need to provide a local file or a URL that points to a publicly accessible audio/video file. For example, files in an S3 bucket, on your server, etc.
Using a video link
The AssemblyAI CLI accepts YouTube video links as input and can process videos of up to 4 hours.Advanced
In addition to its basic functionality, the AssemblyAI CLI offers several advanced flags that allow you to explore different AI models and customize the transcription result. These flags can be used to control the formatting, timing, and other aspects of the output. Some of the available flags include--summarization and --dual_channel, which can be used to generate a single abstractive summary of entire file, and to transcribe audio from both the left and right channels of a stereo recording, respectively.
To see the full list of available flags, use the --help argument.