• Stars
    star
    189
  • Rank 203,496 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI for the AssemblyAI API

AssemblyAI CLI

Release Build License

The AssemblyAI CLI helps you quickly test our latest AI models right from your terminal, with minimal installation required.

Thumbnail

Installation

The CLI is simple to install, supports a wide range of operating systems like macOS, Windows, and Linux, and makes it more seamless to build with AssemblyAI.

Homebrew

If you're on macOS, you can install it using Homebrew:

brew tap assemblyai/assemblyai
brew install assemblyai

macOS or Linux

If you don't have Homebrew installed, or are running Linux:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)"

Windows

The CLI is available on Windows either via Scoop or by script.

Via Scoop:

scoop bucket add assemblyai https://github.com/assemblyai/scoop-assemblyai.git
scoop install assemblyai

Or via PowerShell as an administrator:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.ps1 | iex
New-Alias -Name assemblyai -Value $Env:Programfiles/AssemblyAI/assemblyai.exe

Getting started

Get started by configuring the CLI with your AssemblyAI token. If you don't yet have an account, create one here.

assemblyai config [token]

This command will validate your account, and store your token safely in ~/.config/assemblyai/config.toml later to be used when transcribing files.

You can now transcribe local files, remote URLs, or YouTube videos.

assemblyai transcribe https://youtu.be/0wvBu014E5o --auto_highlights --entity_detection

Usage

Installing the CLI provides access to the assemblyai command:

assemblyai [command] [--flags]

Commands

Transcribe

With the CLI, you can transcribe local files, remote URLs, and YouTube links.

assemblyai transcribe [local file | remote url | youtube links] [--flags]
Flags

-j, --json
default: false
example: -j or --json
If true, the CLI will output the JSON.

-p, --poll
default: true
example: -p or --poll
The CLI will poll the transcription every 3 seconds until it's complete.

-s, --auto_chapters
default: false
example: -s or --auto_chapters
A "summary over time" for the audio file transcribed.

-a, --auto_highlights
default: false
example: -a or --auto_highlights
Automatically detect important phrases and words in the text.

-c, --content_moderation
default: false
example: -c or --content_moderation
Detect if sensitive content is spoken in the file.

-d, --dual_channel
default: false
example: -d or --dual_channel
Enable dual channel

-D, --disfluencies
default: false
example: -D or --disfluencies
Include Filler Words in your transcript

-e, --entity_detection
default: false
example: -e or --entity_detection
Identify a wide range of entities that are spoken in the audio file.

-f, --format_text
default: true
example: -f=false or --format_text=false
Enable text formatting

-u, --punctuate
default: true
example: -u=false or --punctuate=false
Enable automatic punctuation

-r, --redact_pii
default: false
example: -r or --redact_pii
Remove personally identifiable information from the transcription.

-i, --redact_pii_policies
default: drug,number_sequence,person_name
example: -i medical_process,nationality or --redact_pii_policies medical_process,nationality
The list of PII policies to redact (source), comma-separated. Required if the redact_pii flag is true.

-x, --sentiment_analysis
default: false
example: -x or --sentiment_analysis
Detect the sentiment of each sentence of speech spoken in the file.

-l, --speaker_labels
default: true
example: -l=false or --speaker_labels=false
Automatically detect the number of speakers in the file.

-t, --topic_detection
default: false
example: -t or --topic_detection
Label the topics that are spoken in the file.

-w, --webhook_url
example: --webhook_url "https://example.com/"
Receive a webhook once your transcript is complete.

-b, --webhook_auth_header_name
example: --webhook_auth_header_name "Authorization"
Containing the header's name which will be inserted into the webhook request.

-o, --webhook_auth_header_value
example: --webhook_auth_header_value "foo:bar"
Receive a webhook once your transcript is complete.

-n, --language_detection
default: false
example: -n or --language_detection
Automatic identify the dominant language thatโ€™s spoken in an audio file. Here you can view the ALD list for supported languages

-g, --language_code
example: -g es or --language_code es
Manually specify the language of the speech in your audio file. Click here to view all the supported languages

-m, --summarization
default: false
example: -m or --summarization
Generate a single abstractive summary of the entire audio.

-q, --summary_model default: bullets
example: -q conversational or --summary_model conversational
Type of summary generated. Click here to view all the supported types

-y, --summary_type default: bullets
example: -y paragraph or --summary_type paragraph
Model of summary generated. Click here to view all the supported types

-k, --word_boost example: -k "sally mcmanus,the IQEZ iPhone app" or --word_boost "sally mcmanus,the IQEZ iPhone app"
Any term included will have its likelihood of being transcribed boosted.

-z, --boost_param example: -z high or --word_boost high
Control how much weight should be applied to your boosted keywords/phrases. This value can be either low, default, or high. --custom_spelling example: --custom_spelling "[{\"from\": [\"ariana\"], \"to\": \"Arianna\"}]" or --custom_spelling ./custom_spelling.json Specify how words are spelled or formatted in the transcript text.

--srt
default: false
example: --srt
Create an SRT file named [id].srt in the current directory.

Get

If you're not polling the transcription, you can fetch it later:

assemblyai get [id]
Flags

-j, --json
default: false
example: --json or --json=true
If true, the CLI will output the JSON.

-p, --poll
default: true
example: --poll=false
The CLI will poll the transcription every 3 seconds until it's complete.

--srt
default: false
example: --srt
Create an SRT file named [id].srt in the current directory.

Exporting Output to a File

You can export the output of AssemblyAI CLI commands to a file by using shell redirection. To export the output to a text file, use the > operator followed by the name of the file you want to create.

assemblyai get [id] > transcript.txt

To save the raw JSON response from the API, you can do this instead:

assemblyai get [id] -j > transcript.json

Note that if the file you are exporting to already exists, its contents will be overwritten. If you want to append the output to an existing file, use the >> operator instead of >.

Contributing

We're more than happy to welcome new contributors. If there's something you'd like to fix or improve, start by creating an issue. Please make sure to follow our code of conduct.

Telemetry

The AssemblyAI CLI includes a telemetry feature that collects usage data and is enabled by default.

To opt out of telemetry, set the telemetry variable in the config.toml file to false.

Upgrade

Our team regularly releases updates to ensure world-class service, so make sure to update your CLI when a new release is available. You can do so by running the same commands as shown on the Installation section, or, if you've installed using brew, run:

brew upgrade assemblyai

Feedback

Please don't hesitate to let us know what you think!

Uninstall

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/uninstall.sh)"

We'd love to understand why you're uninstalling the CLI, and what we can do to improve it. Feel free to reach out.

License

Copyright (c) AssemblyAI. All rights reserved.

Licensed under the Apache License 2.0 license.

More Repositories

1

youtube-tutorials

Companion code for tutorials on the AssemblyAI YouTube channel
Jupyter Notebook
143
star
2

assemblyai-python-sdk

AssemblyAI's Official Python SDK
Python
133
star
3

realtime-transcription-browser-js-example

Demo of AssemblyAI's Real-Time Websocket API (In Browser with JavaScript)
JavaScript
97
star
4

cookbook

A resource of code examples, guides, and tutorials for using the AssemblyAI API.
Jupyter Notebook
82
star
5

assemblyai-node-sdk

The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, audio intelligence models, as well as the latest LeMUR models.
TypeScript
33
star
6

assemblyai-algolia-voice-widget

JavaScript
24
star
7

assemblyai-go-sdk

Official Go SDK
Go
15
star
8

kaldi-asr-tutorial

Repo for hosting tutorial code associated with the Kaldi Speech Recognition for Beginners - A Simple Tutorial blog by AssemblyAI
Shell
11
star
9

real-time-captions-demo

JavaScript
8
star
10

assemblyai-semantic-kernel

Transcribe audio using AssemblyAI with Semantic Kernel plugins.
C#
8
star
11

assemblyai-java-sdk

The AssemblyAI Java SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, audio intelligence models, as well as the latest LeMUR models.
Java
8
star
12

python-websocket-client

Sample Python client for real-time streaming over websockets
Python
8
star
13

assemblyai-haystack

Haystack integration
Python
8
star
14

assemblyai-recallai-zoom-bot

Create a Transcription Bot for Zoom using Recallai and AssemblyAI
JavaScript
6
star
15

assemblyai-webrtc-sample-project

Official AssemblyAI sample project using WebRTC for real-time speech-to-text from the browser
JavaScript
5
star
16

speaker-diarization

Upload a local file and use AssemblyAI's Speaker Labels model to display turn-by-turn utterances for your file.
Python
5
star
17

assemblyai-csharp-sdk

The AssemblyAI C# .NET SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, audio intelligence models, as well as the latest LeMUR models.
C#
5
star
18

assemblyai-ruby-sdk

The AssemblyAI Ruby SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, audio intelligence models, as well as the latest LeMUR models.
Ruby
5
star
19

assemblyai-webrtc-wrapper

A WebRTC wrapper to stream audio from the browser for Speech-to-Text
JavaScript
4
star
20

assemblyai-api-spec

The OpenAPI spec, AsyncAPI spec, and Postman collection for AssemblyAI's APIs
MDX
4
star
21

c-sharp-helper-library

C#
3
star
22

drone-queue-cloudwatch

Publish Drone build metrics to Cloudwatch
Go
3
star
23

nodejs-getting-started-stt

This repo accompanies an AssemblyAI blog post.
JavaScript
3
star
24

drone-deploy-ecs

A Drone plugin to deploy to ECS
Go
3
star
25

meeting-notes

Use AssemblyAI's Auto Chapters model to generate meeting notes.
Python
3
star
26

speech-to-text-golang-example

Example how to use speech-to-text in Go with AssemblyAI
Go
3
star
27

replacing-spotinst

A guideline for replacing Spotinst with an AWS-native solution
HCL
2
star
28

wer-demo

Demo of normalizing text and calculating WER
Python
2
star
29

assemblyai-postman

Postman client workspace
1
star
30

captions-demo

A demo demonstrating how to add captions to your videos using a VTT file generated by AssemblyAI
JavaScript
1
star
31

startingHttpClientFactory

A demo project to show .NET HttpClientFactory in use
C#
1
star
32

assemblyai-insomnia

Insomnia client workspace
1
star
33

podcast-chapterization

Use AssemblyAI's Auto Chapters model and Listen Notes to generate chapters for your favorite podcasts.
Python
1
star
34

sticky-url-params

JavaScript
1
star
35

profanity-filter-demo

Submit a YouTube video and use AssemblyAI's Profanity Filter to censor profanities.
Python
1
star
36

StartingHttpClientFactory

A demo project to show .NET HttpClientFactory in use
C#
1
star
37

kaldi-install-tutorial

Repo for hosting tutorial code associated with the Kaldi Install for Dummies blog by AssemblyAI
Shell
1
star