English | 中文
Whisper Plugin is a plugin for Maubot, Support for transcriptions of audio messages to text in Matrix clients using OpenAI's Whisper API
- Automatically responds to audio and file messages in rooms
- Calls OpenAI Whisper API for audio transcription
- Supports user and room whitelists
- Support reply in thread
-
Clone or download the plugin code:
git clone <repository_url> cd <repository_directory> zip -9r maubot-stt.mbp *
-
Configure Maubot:
Make sure you have installed and set up Maubot. Refer to Maubot's official documentation for detailed steps.
-
Upload the plugin:
Upload the plugin in the Maubot management interface.
After uploading the plugin, you need to configure it. Here are the configuration items:
api_endpoint
: OpenAI Whisper API endpoint, default ishttps://api.openai.com/v1/audio/transcriptions
.openai_api_key
: Your OpenAI API key.allowed_users
: List of users allowed to use this plugin. If empty, all users are allowed.allowed_rooms
: List of rooms allowed to use this plugin. If empty, all rooms are allowed.
In the Maubot management interface, go to the plugin's configuration page and fill in the following content:
{
"api_endpoint": "https://api.openai.com/v1/audio/transcriptions",
"openai_api_key": "your_openai_api_key",
"allowed_users": ["@user1:matrix.org", "@user2:matrix.org"],
"allowed_rooms": ["!roomid:matrix.org"]
}
It is recommended to close and reopen the instance configuration after saving.
The plugin will automatically listen to messages in the room and perform the following actions upon receiving a voice message or audio file:
- Download the audio file.
- Call the OpenAI Whisper API for transcription.
- Send the transcription result as a text message to the corresponding room.
This project is licensed under the MIT License.