Skip to content

4350pChris/matrix-transcriptions

Repository files navigation

Matrix Transcriptions

Hate listening to voice messages? Yeah, me too

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.

How To Use

  1. Create a Gladia account and get an API key.
  2. Create a bot user for this project on your Matrix server.
  3. 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.
  4. 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.
  5. Start the bot by using either of the methods mentioned below.
  6. (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.
  7. Restart the bot. It should now be able to transcribe voice messages sent to your user account and text you the transcription.

Docker

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.

Node

You can also run the bot using Node. Make sure you have pnpm installed.

Prepare

  • pnpm install
  • pnpm run build

Run

  • pnpm run prod

Environment Variables

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 be general, bullet_points or concise.
  • SUMMARIZE: Whether you want to summarize the transcription or not. Defaults to true. Can be true or false.
  • MATRIX_HOMESERVER: The URL of your Matrix homeserver. Something like https://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.

About

Transcribe those annoying voice messages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages