← 开源
vilassn

whisper_android

Offline Speech Recognition with OpenAI Whisper and TensorFlow Lite for Android

ApplicationsSpecialistsC++
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
694
Star
112
Fork
+3
本周
2
贡献者
创建于 2023-08-26 · 更新于 2026-10-14 · 今日第 14905 名
主要开发者
vilassnsergenes

vilassn/whisper_android 排名第 14,905,有 694 个星标。

同类别比较

vilassn/whisper_android 排名第 14,905,此处有 8 个同类条目;leona/helix-gpt 排名第 14,903。

同类别比较
名称排名指标
Amery2010/peinture14,878
语言:
TypeScript
星标数:
695
分叉数:
272
简介:
A general-purpose AI image generation framework that supports Hugging Face, Gitee, Model Scope, and more.
codingmoh/open-codex14,884
语言:
Python
星标数:
695
分叉数:
55
简介:
Fully open-source command-line AI assistant inspired by OpenAI Codex, supporting local language models.
m-sec-org/BreachWeave14,888
语言:
TypeScript
星标数:
695
分叉数:
103
简介:
智能渗透Agent Manager/Observer/Solver 多角色架构,基于 pi-mono SDK。
leona/helix-gpt14,903
语言:
TypeScript
星标数:
694
分叉数:
44
简介:
Code assistant language server for Helix with support for Copilot/OpenAI/Codeium/Ollama
Wildric-Auric/MidJourney-Wrapper14,912
语言:
Python
星标数:
693
分叉数:
137
简介:
MidJourney wrapper in Discord.
evilgix/Evil14,916
语言:
Swift
星标数:
693
分叉数:
96
简介:
Optical Character Recognition in Swift for iOS&macOS. 银行卡、身份证、门牌号光学识别
juntoku9/claude_immigration_attorney14,918
语言:
Shell
星标数:
693
分叉数:
80
简介:
Claude code environment for laywers
steve02081504/fount14,921
语言:
JavaScript
星标数:
693
分叉数:
65
简介:
🪩 Something beautiful is going to happen in runtime. 🍸
关键参数与规格
关键参数与规格
参数值
语言C++
类别Applications
子类别Specialists
关键词Speech-to-text
星标数694
分叉数112
贡献者2
创建日期2023-08-26
更新日期2026-10-14
1 天星标数0
7 天星标数3
排名14,905
上次排名4,340
排名变化-10,565
7 天星标排名7,293
上次 7 天星标排名8,682
7 天星标排名变化1,389
总星标排名14,982
上次总星标排名14,948
总星标排名变化-34
国家India
README 摘录

Offline Speech Recognition with Whisper & TFLite This repository offers two Android apps leveraging the OpenAI Whisper speech-to-text model. One app uses the TensorFlow Lite Java API for easy Java integration, while the other employs the TensorFlow Lite Native API for enhanced performance. It also includes a Python script for model generation and pre-built APKs for straightforward deployment. 📂 Folder Structure **whisper_java**: An Android app using the TensorFlow Lite Java API for model inference with Whisper, ideal for

Java developers integrating TensorFlow Lite. **whisper_native**: An Android app utilizing the TensorFlow Lite Native API for model inference, offering optimized performance for developers preferring native code. **models_and_scripts**: Contains a Python script to convert Whisper models into TensorFlow Lite format and includes pre-generated TFLite models. : Directory with optimized TFLite models. **demo_and_apk**: Contains pre-built APKs for direct Android installation. 🚀 How to Use **Running the Whisper Java App** 1. Build and run on an Android device

or emulator. **Running the Whisper Native App** Follow similar steps as above for the app. Whisper ASR Integration Guide This guide explains how to integrate Whisper and Recorder class in Android apps for audio recording and speech recognition. Here are separate code snippets for using and : Whisper (Speech Recognition) **Initialization and Configuration:** **Transcription:** Recorder (Audio Recording) **Initialization and Configuration:** **Recording:** Please adapt these code snippets to your specific use case, provide the correct file paths, and handle exceptions appropriately in

your application. **Note**: Ensure that you have the necessary permissions, error handling, and file path management in your application when using the class. Demo Video Live Transcription Important Note Whisper ASR is a powerful tool for transcribing speech into text. However, keep in mind that handling audio data and transcriptions may require careful synchronization and error handling in your Android application to ensure a smooth user experience. Enjoy using the Whisper ASR Android app to enhance your speech recognition capabilities

! 💖 Support This Project Maintaining this project requires time and effort. If you find it useful and would like to support its development, you can contribute via PayPal: 🔹 PayPal Direct Link: For any inquiries or business-related discussions, feel free to reach out: 📧 Email: vilassninawe@gmail. 🚀 Acknowledgements This project uses the following open-source implementation: Niranjan Yadla (2022) *Whisper TFLite: OpenAI Whisper Model Port for Edge Devices* `bibtex @misc{nyadla-sys, author = {Niranjan Yadla}, title = {{Whisper TFLite: OpenAI Whisper Model Port

for Edge Devices}}, year = 2022, howpublished = {GitHub Repository}, url = { note = {Original TFLite implementation of OpenAI Whisper for on-device automatic speech recognition} }

常见问题

记录了多少星标和分叉?

vilassn/whisper_android 有 694 个星标和 112 个分叉。

仓库排名是多少?

vilassn/whisper_android 排名第 14,905。

记录的语言和类别是什么?

vilassn/whisper_android 有 694 个星标,语言为 C++,类别为 Applications。

哪个仓库排名最接近?

vilassn/whisper_android 与 leona/helix-gpt 比较,后者排名第 14,903,有 694 个星标。

README

Offline Speech Recognition with Whisper & TFLite

This repository offers two Android apps leveraging the OpenAI Whisper speech-to-text model. One app uses the TensorFlow Lite Java API for easy Java integration, while the other employs the TensorFlow Lite Native API for enhanced performance. It also includes a Python script for model generation and pre-built APKs for straightforward deployment.

📂 Folder Structure

  • whisper_java:
    An Android app using the TensorFlow Lite Java API for model inference with Whisper, ideal for Java developers integrating TensorFlow Lite.

  • whisper_native:
    An Android app utilizing the TensorFlow Lite Native API for model inference, offering optimized performance for developers preferring native code.

  • models_and_scripts:
    Contains a Python script to convert Whisper models into TensorFlow Lite format and includes pre-generated TFLite models.

    • generate_model.py: Script for generating TFLite models.
    • generated_model: Directory with optimized TFLite models.
  • demo_and_apk:
    Contains pre-built APKs for direct Android installation.

🚀 How to Use

  • Running the Whisper Java App

    1. Navigate to the whisper_java folder.
    2. Open the project in Android Studio.
    3. Build and run on an Android device or emulator.
  • Running the Whisper Native App

    • Follow similar steps as above for the whisper_native app.

Whisper ASR Integration Guide

This guide explains how to integrate Whisper and Recorder class in Android apps for audio recording and speech recognition.

Here are separate code snippets for using Whisper and Recorder:

Whisper (Speech Recognition)

Initialization and Configuration:

// Initialize Whisper
Whisper mWhisper = new Whisper(this); // Create Whisper instance

// Load model and vocabulary for Whisper
String modelPath = "path/to/whisper-tiny.tflite"; // Provide model file path
String vocabPath = "path/to/filters_vocab_multilingual.bin"; // Provide vocabulary file path
mWhisper.loadModel(modelPath, vocabPath, true); // Load model and set multilingual mode

// Set a listener for Whisper to handle updates and results
mWhisper.setListener(new IWhisperListener() {
    @Override
    public void onUpdateReceived(String message) {
        // Handle Whisper status updates
    }

    @Override
    public void onResultReceived(String result) {
        // Handle transcribed results
    }
});

Transcription:

// Set the audio file path for transcription. Audio format should be in 16K, mono, 16bits
String waveFilePath = "path/to/your_audio_file.wav"; // Provide audio file path
mWhisper.setFilePath(waveFilePath); // Set audio file path

// Start transcription
mWhisper.setAction(Whisper.ACTION_TRANSCRIBE); // Set action to transcription
mWhisper.start(); // Start transcription

// Perform other operations
// Add your additional code here

// Stop transcription
mWhisper.stop(); // Stop transcription

Recorder (Audio Recording)

Initialization and Configuration:

// Initialize Recorder
Recorder mRecorder = new Recorder(this); // Create Recorder instance

// Set a listener for Recorder to handle updates and audio data
mRecorder.setListener(new IRecorderListener() {
    @Override
    public void onUpdateReceived(String message) {
        // Handle Recorder status updates
    }

    @Override
    public void onDataReceived(float[] samples) {
        // Handle audio data received during recording
        // You can forward this data to Whisper for live recognition using writeBuffer()
        // mWhisper.writeBuffer(samples);
    }
});

Recording:

// Check and request recording permissions
checkRecordPermission(); // Check and request recording permissions

// Set the audio file path for recording. It record audio in 16K, mono, 16bits format
String waveFilePath = "path/to/your_audio_file.wav"; // Provide audio file path
mRecorder.setFilePath(waveFilePath); // Set audio file path

// Start recording
mRecorder.start(); // Start recording

// Perform other operations
// Add your additional code here

// Stop recording
mRecorder.stop(); // Stop recording

Please adapt these code snippets to your specific use case, provide the correct file paths, and handle exceptions appropriately in your application.

Note: Ensure that you have the necessary permissions, error handling, and file path management in your application when using the Recorder class.

Demo Video

Live Transcription

Important Note

Whisper ASR is a powerful tool for transcribing speech into text. However, keep in mind that handling audio data and transcriptions may require careful synchronization and error handling in your Android application to ensure a smooth user experience.

Enjoy using the Whisper ASR Android app to enhance your speech recognition capabilities!

💖 Support This Project

Maintaining this project requires time and effort. If you find it useful and would like to support its development, you can contribute via PayPal:

🔹 PayPal Direct Link: https://www.paypal.com/vilassn

For any inquiries or business-related discussions, feel free to reach out: 📧 Email: vilassninawe@gmail.com

Thank you for your support! 🚀

Acknowledgements

This project uses the following open-source implementation:

@misc{nyadla-sys,
  author = {Niranjan Yadla},
  title = {{Whisper TFLite: OpenAI Whisper Model Port for Edge Devices}},
  year = 2022,
  howpublished = {GitHub Repository},
  url = {https://github.com/nyadla-sys/whisper.tflite},
  note = {Original TFLite implementation of OpenAI Whisper for on-device automatic speech recognition}
}
排名相邻
同类项目