This project can transcribe voice messages sent to your Matrix account, so you don't have to listen to them. It uses Gladia to do that for now, but the aim is to integrate multiple backends in the future.
- Create a Gladia account and get an API key.
- Create a bot user for this project on your Matrix server.
- Get the access token of the user you want to receive transcriptions (probably your own) and your bot user. See this Stackexchange post for an example on how to do that.
- Copy
.env.sample
to.env
and fill in the required values. For now you won't know the channel ID, so just leave it empty. We'll get to that later. - Start the bot by using either of the methods mentioned below.
- (Will probably change in the future) For now, you'll have to text the bot from your user account once to get the bot to join the room and get the room ID in the output of your docker container or terminal. You can then copy the room ID to the
.env
file. - Restart the bot. It should now be able to transcribe voice messages sent to your user account and text you the transcription.
There's a docker image available at ghcr.io/4350pchris/matrix-transcriptions
and chris5896/matrix-transcriptions
. Also, there's a docker-compose file available in the repository which you can use to start the bot.
You can also run the bot using Node. Make sure you have pnpm
installed.
pnpm install
pnpm run build
pnpm run prod
There's a .env.sample
file in the repository which you can copy to .env
and fill in the required values.
GLADIA_API_KEY
: The API key you get from Gladia.GLADIA_SUMMARIZATION_TYPE
: The type of summarization you want to use. Can begeneral
,bullet_points
orconcise
.SUMMARIZE
: Whether you want to summarize the transcription or not. Defaults totrue
. Can betrue
orfalse
.MATRIX_HOMESERVER
: The URL of your Matrix homeserver. Something likehttps://matrix.org
.MATRIX_USER_ID
: The user ID of the user account that should receive transcriptions. Most likely this will be your own user ID.MATRIX_USER_ACCESS_TOKEN
: The access token of the user account that should receive transcriptions.MATRIX_BOT_USER_ID
: The user ID of the bot user you created.MATRIX_BOT_ACCESS_TOKEN
: The access token of the bot user you created.MATRIX_CHANNEL_ID
: The ID of the room the bot should join. You can get this by sending a message to the bot and checking the output of the docker container or terminal as described above.