You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
## 🤖 _Powered by ChatKeke_ 🚀
4
4
5
5
-**A simple-to-use, quick-to-deploy Python-based Telegram bot for OpenAI API & Perplexity API**
6
-
-**🎙 Transcribed voice messages over Whisper API**
7
-
-(auto-transcriptions, translations, and other messages to the bot over TG's voice messages)
6
+
-**🎙 Transcribed Telegram voice messages via OpenAI speech-to-text models (Whisper and others)**
7
+
-Supports configurable STT models such as `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, and legacy `whisper-1`
8
8
-**☁️ Real-time weather info, weather alerts, and geolocation data via [OpenWeatherMap](https://openweathermap.org/), [WeatherAPI](https://www.weatherapi.com/) and U.S. NWS ([weather.gov](https://weather.gov))**
9
9
-**🗺 Geolocation and map lookups via MapTiler API**
10
10
- (with weather forecasts around the world in all OpenAI API supported languages)
@@ -240,6 +240,44 @@ If you run into any issues, consult the logs or reach out on the repository's [I
240
240
---
241
241
242
242
# Changelog
243
+
244
+
- v0.8.2 - Configurable OpenAI speech-to-text model support for Telegram voice messages
245
+
- Updated Telegram voice message transcription handling for the current OpenAI audio transcription model lineup.
246
+
- Added configurable speech-to-text model selection through `config.ini`:
247
+
-`STTModel = gpt-4o-transcribe`
248
+
-`STTModel = gpt-4o-mini-transcribe`
249
+
-`STTModel = whisper-1`
250
+
- Kept backward compatibility with the old `EnableWhisper` config flag so existing configs do not break.
251
+
- Added `OPENAI_STT_MODEL` environment-variable fallback for overriding the configured STT model in Docker/systemd/shell deployments.
252
+
- Changed the default voice transcription model from legacy `whisper-1` to modern `gpt-4o-transcribe`.
253
+
- Refactored `src/voice_message_handler.py` so the STT model is read from the main `TelegramBot` config object instead of being hardcoded in the voice module.
254
+
- Added lazy OpenAI async client initialization for voice transcription so the client is created only after API key loading.
255
+
- Preserved support for legacy `whisper-1` as a fallback model.
- Improved Telegram HTML safety by escaping transcribed text before wrapping it in HTML formatting.
259
+
- Improved model-facing voice transcription formatting through `context.user_data["transcribed_text"]`.
260
+
- Fixed voice message duration checking so `MaxDurationMinutes` is correctly treated as minutes while Telegram/audio duration values are handled as seconds.
261
+
- Improved voice message logging with detailed metadata:
262
+
- Telegram user ID
263
+
- username
264
+
- first/last name
265
+
- chat ID
266
+
- chat type/title
267
+
- message ID
268
+
- Telegram voice file ID / unique ID
269
+
- voice duration
270
+
- MIME type
271
+
- file size
272
+
- local downloaded file path
273
+
- selected STT model
274
+
- final transcription text
275
+
- Logs detailed voice transcription events into `bot.log`.
276
+
- Logs transcription events into `chat.log` when `ChatLoggingEnabled = True`.
277
+
- Cleaned up `main.py` voice handler registration:
278
+
- removed the old extra-argument voice handler path
279
+
- now routes voice messages through `self.voice_message_handler`
280
+
- Fixed `load_config()` directory creation logging by replacing undefined `logger` references with a local `TelegramBotLogger`.
243
281
- v0.8.1 - Startup status banner cleanup
244
282
- Added Perplexity API enabled/disabled status to the startup banner.
245
283
- Reads Perplexity status from `[Perplexity] -> Enabled` in `config.ini`.
0 commit comments