Based on earlier experience and Telegram / YandexSpeechKit docs.
NOTA BENE. Suitable for processing 30-seconds messages only.
Create a file config.ini
with the following contents:
[telegram]
key=your_telegram_bot_key
[yandex]
id=your_yandex_cloud_service_api_id
key=your_yandex_cloud_service_api_key
I suggest that you do not commit it.
Ask @BotFather for a new bot and all the corresponding keys and stuff. Then write a secret key into config.ini
as a [teleram].key
thing.
Get an API key for a Service at YandexCloud.
- Go to https://console.cloud.yandex.ru/
- "Перейти в текущий каталог" (by that time you should have created some YCloud account).
- "Сервисные аккаунты" on the left panel.
- "Создать сервисный аккаунт".
- Everything else is obvious.
You will be provided with your id and a key; this is the last time
you will have seen your key, so do not forget to copy and save it somewhere. Including config.ini
.
python bot.py
This is Beerware, so worry not.