{"id":14964638,"url":"https://github.com/seanoliver/audioflare","last_synced_at":"2025-10-25T09:32:00.129Z","repository":{"id":200251533,"uuid":"704728466","full_name":"seanoliver/audioflare","owner":"seanoliver","description":"An all-in-one AI audio playground using Cloudflare AI Workers to transcribe, analyze, summarize, and translate any audio file.","archived":false,"fork":false,"pushed_at":"2023-10-29T00:31:39.000Z","size":22258,"stargazers_count":399,"open_issues_count":8,"forks_count":30,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-30T00:52:07.379Z","etag":null,"topics":["ai","cloudflare","distilbert","llama2","m2m100","openai","whisper"],"latest_commit_sha":null,"homepage":"https://audioflare.seanoliver.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanoliver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-13T23:27:04.000Z","updated_at":"2024-10-27T12:42:11.000Z","dependencies_parsed_at":"2023-10-29T01:24:48.155Z","dependency_job_id":null,"html_url":"https://github.com/seanoliver/audioflare","commit_stats":null,"previous_names":["seanoliver/tldh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanoliver%2Faudioflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanoliver%2Faudioflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanoliver%2Faudioflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanoliver%2Faudioflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanoliver","download_url":"https://codeload.github.com/seanoliver/audioflare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445681,"owners_count":20939961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cloudflare","distilbert","llama2","m2m100","openai","whisper"],"created_at":"2024-09-24T13:33:33.287Z","updated_at":"2025-10-25T09:31:55.089Z","avatar_url":"https://github.com/seanoliver.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/seanoliver/audioflare\"\u003e\n    \u003cimg src=\"public/images/audioflare-header.png\" alt=\"Audioflare Logo\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1 align=\"center\"\u003eAudioflare\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    An all-in-one AI audio playground using Cloudflare AI Workers to transcribe, analyze, summarize, and translate any audio file.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://audioflare.seanoliver.dev/\" target=\"_blank\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/seanoliver/audioflare/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/seanoliver/audioflare/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n![Top Languages](https://img.shields.io/github/languages/top/seanoliver/audioflare)\n![GitHub repo size](https://img.shields.io/github/repo-size/seanoliver/audioflare)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/seanoliver/audioflare)\n![GitHub contributors](https://img.shields.io/github/contributors/seanoliver/audioflare)\n![GitHub last commit](https://img.shields.io/github/last-commit/seanoliver/audioflare)\n![GitHub issues](https://img.shields.io/github/issues/seanoliver/audioflare)\n![GitHub](https://img.shields.io/github/license/seanoliver/audioflare)\n\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n         \u003cli\u003e\u003ca href=\"#demo\"\u003eDemo\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#key-features\"\u003eKey Features\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About This Project\n\nAudioflare emerged from my side project endeavors at [Smol AI](https://smol.ai), specifically aimed at exploring the capabilities of [Cloudflare AI workers](https://developers.cloudflare.com/workers-ai/). 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:\n\n1. **Transcription**:\n   - Initially, the audio file is transcribed using Cloudflare's Speech to Text worker, which is built on OpenAI's `whisper` API.\n\n2. **Summarization**:\n   - The transcribed text is then summarized using Cloudflare's LLM AI worker, based on Meta's `llama-2-7b-chat-int8` model. It's worth noting that the LLM model struggles with lengthy prompts.\n\n3. **Sentiment Analysis**:\n   - Sentiment analysis is performed on the transcribed text using Cloudflare's Text Classification AI worker, leveraging the Huggingface’s `distilbert-sst-2-int8` model.\n\n4. **Translation**:\n   - The transcribed text is translated into nine languages using Cloudflare's Translation AI workers, which utilize Meta's `m2m100-1.2b` model.\n\n5. **Performance Metrics**:\n   - The time taken for each request to be processed is calculated and disclosed, providing insight into the performance metrics.\n\n6. **Observability and Monitoring**:\n   - The [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/) is used to add observability and monitoring to the AI workers, including analytics, logging, caching, and rate limiting.\n\nThe current setup has its limitations; transcription is confined to 30 seconds, and the LLM model's performance on summarization could be better.\n\nThe 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.\n\nYour 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.\n\nAs Cloudflare broadens its model support, I look forward to refining Audioflare, making it a more robust and informative template for the developer community.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Demo\n\n\u003cp\u003e\n  \u003cimg src=\"public/images/audioflare-demo.gif\" alt=\"Audioflare Demo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Key Features\n\n- **Audio Processing**:\n   - Users can upload an audio file for processing.\n      - Drag and drop a local audio file from their computer.\n      - Alternatively, drag and drop one of three pre-provided audio files included on the main page and in this repo.\n   - Audio files longer than 30 seconds are supported, but only the first 30 seconds will be transcribed.\n   - Audio transcription is handled by Cloudflare's Speech to Text worker (based on OpenAI's `Whisper` API).\n\n- **Text Summarization**:\n   - Transcribed text is summarized using Cloudflare's LLM AI worker (based on Meta's `llama-2-7b-chat-int8` model).\n\n- **Sentiment Analysis**:\n   - Sentiment analysis is performed on the transcribed text using Cloudflare's Text Classification AI worker (based on Huggingface’s `distilbert-sst-2-int8` model).\n\n- **Translation**:\n   - Transcribed text is translated into nine different languages using Cloudflare's Translation AI workers (based on Meta's `m2m100-1.2b` model).\n\n- **Performance Metrics**:\n   - Time taken for each request to be processed is calculated and displayed.\n\n- **Observability and Monitoring**:\n\n   - Uses [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/) to add observability and monitoring to the AI workers:\n     - **Analytics**: View metrics like the number of requests and tokens.\n     - **Logging**: Monitor requests and errors.\n     - **Caching**: Serve requests from Cloudflare’s cache for faster response and cost savings.\n     - **Rate Limiting**: Control application scaling by limiting the number of received requests.\n\n- **Learning and Exploration**:\n   - Audioflare serves as a template for learning and working with Cloudflare AI workers.\n   - Users can explore the functionality of different Cloudflare AI workers excluding the Image Classification or Text Embedding workers as they are not integrated due to their irrelevance to the audio use case.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\nThis project was built in 2023 using the following technologies.\n\n- ![React][React]\n- ![Next.js][Next.js]\n- ![Cloudflare][Cloudflare]\n- ![Vercel][Vercel]\n- ![TailwindCSS][TailwindCSS]\n- ![Bun][Bun]\n- ![shadcn/ui][shadcn/ui]\n\nSee [package.json](https://github.com/seanoliver/audioflare/blob/main/package.json) for a full list of dependencies.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n1. Clone this repository\n\n   ```bash\n   git clone https://github.com/seanoliver/audioflare.git\n   ```\n\n2. Install dependencies\n\n   ```bash\n    cd audioflare\n    bun install\n   ```\n\n3. Create a [Cloudflare account](https://dash.cloudflare.com/sign-up/workers-and-pages)\n\n4. Install [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and login\n    ``` bash\n    bun add wrangler --dev\n    wrangler login\n    ```\n\n5. Rename `.env.example` to `.env` and follow the instructions linked in the comments to find each of the required keys and values.\n\n6. Run the app\n\n   ```bash\n    bun dev\n   ```\n\n7. Go to `http://localhost:3000` to check it out\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nThis 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!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See [LICENSE](https://github.com/seanoliver/audioflare/LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nYour Name - [@SeanOliver](https://twitter.com/SeanOliver) - helloseanoliver@gmail.com\n\nProject Link: [https://github.com/seanoliver/audioflare](https://github.com/seanoliver/audioflare)\n\nLive Demo: [https://audioflare.seanoliver.dev/](https://audioflare.seanoliver.dev/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- TECHNOLOGY BADGES --\u003e\n\n[React]: https://img.shields.io/badge/React-61DAFB?logo=react\u0026logoColor=white\n[Next.js]: https://img.shields.io/badge/Next.js-000000?logo=next.js\u0026logoColor=white\n[Cloudflare]: https://img.shields.io/badge/Cloudflare-F38020?logo=cloudflare\u0026logoColor=white\n[Vercel]: https://img.shields.io/badge/Vercel-000000?logo=vercel\u0026logoColor=white\n[TailwindCSS]: https://img.shields.io/badge/TailwindCSS-38B2AC?logo=tailwind-css\u0026logoColor=white\n[Bun]: https://img.shields.io/badge/Bun-black?logo=bun\u0026logoColor=f9f1e1\n[shadcn/ui]: https://img.shields.io/badge/shadcn/ui-007ACC?logo=shadcn/ui\u0026logoColor=black","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanoliver%2Faudioflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanoliver%2Faudioflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanoliver%2Faudioflare/lists"}