← Blog'a Geri Dön Blog

Introducing ACRCloud CLI: Streamline Your Audio Recognition Workflow

Introducing ACRCloud CLI: Streamline Your Audio Recognition Workflow

In the fast-paced world of audio recognition and broadcast monitoring, efficiency is key. While the ACRCloud web console provides a robust interface for managing your resources, power users and developers often need more direct, scriptable access to their tools.

Today, we are excited to introduce the ACRCloud CLI, a powerful command-line interface designed to bridge the gap between your terminal and the ACRCloud Console API.

Why Use the CLI?

The ACRCloud CLI isn't just a wrapper; it's a productivity booster for anyone managing large-scale audio operations. Whether you are automating bulk file uploads, managing hundreds of streaming channels, or integrating recognition tasks into your CI/CD pipelines, the CLI provides the flexibility and speed you need.

Key Features at a Glance

  • Comprehensive Resource Management: Create, list, update, and delete buckets (File, Live, LiveRec, etc.) and projects (AVR, LCD, HR) directly from your terminal.
  • Advanced File Operations: Beyond simple uploads, the CLI supports uploading via URL, handling fingerprints, and even "dumping" file lists for offline auditing.
  • Broadcast Monitoring (BM) at Scale: Manage your custom streams, database projects, and analytics without clicking through multiple web pages.
  • Instant Recognition: Use the filescan command to upload and recognize audio files in one go, with automatic polling for results.
  • Flexible Output Formats: Choose between human-readable tables for quick checks or JSON for integration with other scripts (like jq).
  • Transparency: Easily query your bills, invoices, and service pricing to keep your project budgets in check.

Getting Started

Getting started with the ACRCloud CLI is straightforward. As a Python-based tool, it can be installed via pip.

1. Installation

You can install the CLI directly from PyPI:

pip install acrcloud-cli

Or, if you prefer to stay on the bleeding edge, you can install from source:

git clone https://github.com/acrcloud/acrcloud-cli.git
cd acrcloud-cli
pip install -e .

2. Configuration

To interact with the ACRCloud API, you'll need an Access Token.

  1. Log in to the ACRCloud Console.
  2. Navigate to Account → Developer Settings.
  3. Create a new access token.

Once you have your token, configure the CLI:

acrcloud config set access_token YOUR_ACCESS_TOKEN

Verification is easy:

acrcloud config list

Practical Examples

Here are a few ways the CLI can simplify your daily tasks:

Listing Your Buckets

Quickly see all your storage buckets and their regions:

acrcloud buckets list

Scanning an Audio File

The scan command is a "set and forget" way to identify a file. It handles the upload, starts the recognition engine, and polls for the result:

acrcloud filescan scan my_audio_track.mp3

Managing Broadcast Streams

Need to restart a specific stream in your BM project?

acrcloud bm-cs-projects restart-streams <project_id> --stream-ids "s-ABC123,s-DEF456"

Checking Your Latest Bill

Stay on top of your usage without leaving the console:

acrcloud billing current-bill

Conclusion

The ACRCloud CLI is designed to put the full power of our audio recognition platform right at your fingertips. By moving your workflow to the command line, you unlock new levels of automation and efficiency.

Ready to dive in? Check out the source code and full documentation on GitHub:

ACRCloud CLI on GitHub
ACRCloud CLI on PyPI

We welcome your feedback and contributions! Feel free to open an issue or submit a pull request if you have ideas for new features.

Happy coding!