https://github.com/awslabs/distill-cli
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: awslabs
- License: apache-2.0
- Language: Rust
- Default Branch: main
- Homepage: https://www.allthingsdistributed.com/2024/06/introducing-distill-cli.html
- Size: 79.1 KB
Statistics
- Stars: 227
- Watchers: 7
- Forks: 19
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Summary
The Distill CLI uses Amazon Transcribe and Amazon Bedrock to create summaries of your audio recordings (e.g., meetings, podcasts, etc.) directly from the command line. It is based on the open source tool: Amazon Bedrock Audio Summarizer.
Supported audio formats
Like the Amazon Bedrock Audio Summarizer, the Distill CLI takes a dependency on Amazon Transcribe, and as such, supports the following media formats: AMR, FLAC, M4A, MP3, MP4, Ogg, WebM, WAV.
Language Support
Distill CLI supports configurable language codes for transcription using Amazon Transcribe. Specify the language of the audio file with the --language-code or -l parameter, e.g., --language-code es-US for Spanish (United States). If no language code is provided, it defaults to English (United States) (en-US). For a list of supported languages and their codes, see the Amazon Transcribe Supported Languages Documentation. Use --help for more information on available options. The prompt in the provided config.toml is adjusted so that the provided output matches the language in the transcript.f
S3 Object Deletion
Distill CLI supports the deletion of audio recordings after transcription and summarization activities have completed. Using the --delete-s3-object or -d parameter (e.g., --delete-s3-object Y), the audio file previously uploaded onto Amazon S3 will be deleted. Use --help for more information on available options.
A note on regions
By default, the Distill CLI inherits credentials and configuration details from the AWS CLI. Since Bedrock is not yet available in every region, ensure that the default region in your AWS config is on the list of supported Bedrock regions.
Note: If no region is set in your AWS CLI config, the Distill CLI will default to us-east-1.
To check your defaults, run:
bash
aws configure list
Install the Distill CLI
This project is written in Rust, and uses the AWS SDK for Rust to manage credentials and access AWS services, including S3, Transcribe and Bedrock.
IMPORTANT: By using the Distill CLI, you may incur charges to your AWS account.
Prerequisites
Before using the Distill CLI, you'll need:
- An AWS Account configured with an IAM user that has permissions to Amazon Transcribe, Amazon Bedrock, and Amazon S3.
- Configure the AWS CLI to access your AWS account.
- An S3 bucket to store audio files, or create a new one.
- Access to Anthropic's Claude 3 via the AWS Bedrock Console.
- Rust and Cargo installed.
Step 1: Clone the repo
bash
git clone https://github.com/awslabs/distill-cli.git && cd distill-cli
Step 2: Build from source
Run the following command to build the Distill CLI from source. This will compile the code and create an optimized binary in target/release.
bash
$ cargo build --release
You should see a message like this when the build is complete:
bash
Compiling distill-cli v0.1.0 (/Projects/distill-cli)
Finished release [optimized] target(s) in 18.07s
Usage
Once installed, it's easy to use the Distill CLI. Each operation starts with:
bash
./target/release/distill-cli [arguments]
Here's a simple example. By default, the Distill CLI will print the summary to terminal unless otherwise specified:
bash
./target/release/distill-cli -i meeting.m4a
You'll see something similar to the following:
```bash $ ./target/release/distill-cli -i meeting.m4a
🧙 Welcome to Distill CLI ✔ Choose a destination S3 bucket for your audio file · mys3bucket ⠐ Uploading file to S3... ⠐ Using bucket region eu-west-2... ⠒ Submitting transcription job ⠤ Waiting for transcription to complete... ⠤ Waiting for transcription to complete... ✓ Done!
Summary: Here is a summary of the conversation:
The speakers discussed the recent Premier League matches involving Arsenal, Manchester City, and Liverpool. Arsenal beat Luton Town in their match, while Manchester City also won their game 4-1. This leaves Arsenal tied on points with Manchester City, but with a better goal differential, putting them temporarily in first place ahead of City. However, the speakers expect Liverpool, who are currently one or two points behind Arsenal, to regain the lead after their upcoming match against an opponent perceived as weak.
Key action items and follow-ups:
- Monitor Liverpool's next match results, as they are expected to go back into first place in the Premier League standings
- Keep track of the evolving points totals and goal differentials for Arsenal, Manchester City, and Liverpool as the title race continues ... ```
Options
As this is a simple CLI, there are only a few options.
| Option | Required | Description |
| - | - | - |
| -i, --input-audio-file | Yes | Specify the audio file to be summarized. |
| -o, --output-type | No | Specify the output format of the summary. Default is terminal.
Accepted values: terminal, text, word, markdown, slack |
| -l, --language-code | No | Input language code. Default is en-US.
Accepted values: Check: Amazon Transcribe Supported Languages Documentation |
| -h, --help | No | Provides help for the Distill CLI. |
Config settings
config.toml is used to manage config settings for the Distill CLI and must be in the execution directory of distill-cli.
How to adjust model values
The CLI is intended as a proof-of-concept, and as such is designed to support Anthropic's Claude 3 foundation model. The model, along with values such as max tokens and temperature are specified in config.toml.
[model]
model_id = "anthropic.claude-3-sonnet-20240229-v1:0"
max_tokens = 2000
temperature = 1.0
top_p = 0.999
top_k = 40
IMPORTANT: If changing to a model not provided by Anthropic, code changes may be required to messages and body in summarizer.rs, as the structure of the messages passed to Bedrock may change. Anthropic's models, for example, currently use the Messages API.
Supported Bedrock models
You can view a list of available models at Amazon Bedrock base model IDs, or via the command line:
``` $ aws bedrock list-foundation-models
{ "modelSummaries": [ { "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-tg1-large", "modelId": "amazon.titan-tg1-large", "modelName": "Titan Text Large", "providerName": "Amazon", "inputModalities": [ "TEXT" ], "outputModalities": [ "TEXT" ], "responseStreamingSupported": true, "customizationsSupported": [], "inferenceTypesSupported": [ "ONDEMAND" ] }, { "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-image-generator-v1:0", "modelId": "amazon.titan-image-generator-v1:0", "modelName": "Titan Image Generator G1", "providerName": "Amazon", "inputModalities": [ "TEXT", "IMAGE" ], "outputModalities": [ "IMAGE" ], "customizationsSupported": [ "FINETUNING" ], "inferenceTypesSupported": [ "PROVISIONED" ] }, ... ] } ```
Additional output settings
Slack
To output a summary to a Slack channel, create a Slack webhook, then update and uncomment the endpoint in your config.toml. If you don't set the endpoint, or if the endpoint is commented out, you'll receive the error "Slack webhook endpoint is not configured. Skipping Slack notification.".
``` ...
=============================================================================
Slack Integration
=============================================================================
[slack]
webhook_endpoint = "https://hooks.slack.com/workflows/XYZ/ABC/123"
```
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Watch event: 30
- Fork event: 4
Last Year
- Watch event: 30
- Fork event: 4