- Local Speech-to-Text Model Context Protocol (MCP) Server 🚀
Local Speech-to-Text Model Context Protocol (MCP) Server 🚀
Local Speech-to-Text Model Context Protocol (MCP) Server 🚀
Welcome to the local-stt-mcp repository! This project provides a high-performance Model Context Protocol (MCP) server that enables local speech-to-text transcription using whisper.cpp, optimized specifically for Apple Silicon devices.
Table of Contents
Introduction
The local-stt-mcp project aims to provide an efficient and reliable solution for converting spoken language into text on Apple Silicon devices. By utilizing the capabilities of whisper.cpp, this server processes audio input swiftly and accurately, making it ideal for various applications such as transcription services, voice commands, and more.
Features
- High Performance: Designed to leverage the power of Apple Silicon, ensuring quick and accurate transcription.
- Local Processing: Operates entirely on your device, maintaining your privacy and data security.
- Easy Integration: Provides a simple API for developers to incorporate speech-to-text capabilities into their applications.
- Support for Multiple Languages: Capable of transcribing speech in various languages, making it versatile for global use.
- Customizable Settings: Offers various configuration options to tailor the server to your specific needs.
Installation
To get started with local-stt-mcp, follow these steps to install the necessary components:
-
Clone the Repository:
git clone https://github.com/lilisetyarini/local-stt-mcp.git cd local-stt-mcp -
Install Dependencies: Ensure you have the required dependencies installed. You can do this using Homebrew:
brew install cmake brew install whisper -
Build the Project: Run the following commands to build the project:
mkdir build cd build cmake .. make -
Download and Execute: You can download the latest release from the Releases section. Make sure to execute the binary after downloading.
Usage
Once you have installed the server, you can start using it for speech-to-text transcription. Here’s how:
-
Start the Server: Run the server with the following command:
./local-stt-mcp -
Send Audio Input: You can send audio input to the server using a simple HTTP POST request. Here’s an example using
curl:curl -X POST -F "audio=@path_to_your_audio_file.wav" http://localhost:8080/transcribe -
Receive Transcription: The server will respond with the transcribed text. You can handle this response in your application as needed.
Configuration
The server comes with several configuration options that you can adjust to suit your needs. Here’s how to configure it:
-
Edit the Configuration File: Locate the
config.jsonfile in the root directory of the project. Open it in a text editor. -
Adjust Settings: Modify the settings as required. Here’s an example configuration:
{ "language": "en", "model": "base", "max_length": 100 } -
Restart the Server: After making changes, restart the server for the new settings to take effect.
API Reference
The local-stt-mcp server exposes a RESTful API for interaction. Below are the available endpoints:
Transcribe Audio
- Endpoint:
/transcribe - Method:
POST - Parameters:
audio: The audio file to transcribe (required).
Example Request:
curl -X POST -F "audio=@path_to_your_audio_file.wav" http://localhost:8080/transcribe
Response:
{
"transcription": "This is the transcribed text."
}
Health Check
- Endpoint:
/health - Method:
GET
Example Request:
curl http://localhost:8080/health
Response:
{
"status": "running"
}
Contributing
We welcome contributions to the local-stt-mcp project. Here’s how you can help:
- Fork the Repository: Click on the fork button at the top right of this page.
- Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b feature/your-feature-name - Make Changes: Implement your changes.
- Commit Your Changes: Commit your changes with a clear message.
git commit -m "Add your message here" - Push to Your Branch: Push your changes to your forked repository.
git push origin feature/your-feature-name - Create a Pull Request: Go to the original repository and create a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
For support, please check the Releases section for the latest updates and information. If you encounter issues, feel free to open an issue in the repository.
Thank you for your interest in local-stt-mcp! We hope you find this project useful for your speech-to-text needs on Apple Silicon devices. Happy coding!