Matrix bot convert voice messages to text over cloud api.
Use:
- Invite this bot to your matrix-room.
- If any user in this room send voice message - bot give this message,
- Send to cloud (now yandex) for translate it to text
- send result text as notify-message to this room.
Setup:
- create bot matrix account as simple user account.
- get yandex oauth-token at this link: yandex speach cloud API settings: https://cloud.yandex.ru/docs/iam/operations/iam-token/create
- set options at bot config: oauth="XXXXXX"
- get folder id (from default) at yandex: https://console.cloud.yandex.ru/cloud May be you need create pay account for this by link: https://console.cloud.yandex.ru/
- setup options at config: folder_id = "XXXXXX"
- install boto3 by: pip install boto3
- install pydub by: pip install pydub
- install audio tools: apt-get install libav-tools libavcodec-extra
- mkdir ~/.aws
- cp and edit: cp aws_credentials.example ~/.aws/credentials (get key from https://console.cloud.yandex.ru/cloud, enter catalog, enter service account, create access key , store key_id and key_secret to this config )
- cp aws_config.example ~/.aws/config
- create "auth key" (as 10.) and save private key as file key.pem. Set in config.py service_secret_key_path="key.pem"
- install jwt by: pip install PyJWT
- run bot.py