An all-in-one AI audio playground using Cloudflare AI Workers to transcribe, analyze, summarize, and translate any audio file.
View Demo
·
Report Bug
·
Request Feature
Audioflare emerged from my side project endeavors at Smol AI, specifically aimed at exploring the capabilities of Cloudflare AI workers. The project demonstrates a practical use case by orchestrating a series of AI workers to process an audio file of up to 30 seconds. Here’s a walkthrough of the core functionality:
Transcription:
whisper
API.Summarization:
llama-2-7b-chat-int8
model. It's worth noting that the LLM model struggles with lengthy prompts.Sentiment Analysis:
distilbert-sst-2-int8
model.Translation:
m2m100-1.2b
model.Performance Metrics:
Observability and Monitoring:
The current setup has its limitations; transcription is confined to 30 seconds, and the LLM model's performance on summarization could be better.
The underlying concept of Audioflare underscores the potential of Cloudflare AI workers by standardizing the AI API request framework, simplifying multi-step AI activities. Although the models in use have limitations and are marked as 'beta' by Cloudflare, there's a clear path toward enhancing this project as more models become available.
Your engagement is encouraged. Feel free to submit pull requests and issues as you experiment with Audioflare. This project is intended to serve as a template for learning and working with Cloudflare AI workers, and while it doesn’t currently include Cloudflare's Image Classification or Text Embedding workers due to their irrelevance to the audio use case, it’s a step towards understanding and utilizing the Cloudflare AI ecosystem better.
As Cloudflare broadens its model support, I look forward to refining Audioflare, making it a more robust and informative template for the developer community.
Audio Processing:
Whisper
API).Text Summarization:
llama-2-7b-chat-int8
model).Sentiment Analysis:
distilbert-sst-2-int8
model).Translation:
m2m100-1.2b
model).Performance Metrics:
Observability and Monitoring:
Learning and Exploration:
This project was built in 2023 using the following technologies.
See package.json for a full list of dependencies.
To get a local copy up and running follow these simple steps.
Clone this repository
git clone https://github.com/seanoliver/audioflare.git
Install dependencies
cd audioflare
bun install
Create a Cloudflare account
Install Wrangler and login
bun add wrangler --dev
wrangler login
Rename .env.example
to .env
and follow the instructions linked in the comments to find each of the required keys and values.
Run the app
bun dev
Go to http://localhost:3000
to check it out
This is a great project for learning Cloudflare, AI Workers, and simple Next.js API Routes. Feel free to fork this repo and make it your own. If you have any questions or suggestions, please feel free to contact me!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE for more information.
Your Name - @SeanOliver - helloseanoliver@gmail.com
Project Link: https://github.com/seanoliver/audioflare
Live Demo: https://audioflare.seanoliver.dev/