Skip to content

Commit d9bae01

Browse files
committed
v0.1717.1 - lang switch tweak
1 parent a07f262 commit d9bae01

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ If you just need to see the options and help, type:
220220
```
221221

222222
## Changes
223+
- v0.1717.1 - Language selection _(small tweak)_
224+
- Language can now be shorthand-selected with `/lang` in addition to `/language`
223225
- v0.1717 - **Timestamp formatting fixes & dynamic hour display**
224226
- Fixed a bug where `_timestamped.txt` files would incorrectly drop the hour from timestamps (e.g., a timestamp of `1:23:45` would appear as `[23:45]`).
225227
- Introduced dynamic timestamp formatting, which is on by default. Timestamps for moments under the one-hour mark are now shown in a shortened `[mm:ss]` format. Once a transcription passes the one-hour mark, timestamps automatically switch to the full `[hh:mm:ss]` format within the same file.

src/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# openai-whisper transcriber-bot for Telegram
44

55
# version of this program
6-
version_number = "0.1717"
6+
version_number = "0.1717.1"
77

88
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
# https://github.com/FlyingFathead/whisper-transcriber-telegram-bot/
@@ -173,7 +173,7 @@ async def start_command(self, update: Update, context: CallbackContext) -> None:
173173
"- /help: Get detailed help on how to use this service.\n"
174174
"- /info: View current settings and status.\n"
175175
"- /model: Change the transcription model.\n"
176-
"- /language: Set the transcription language.\n\n"
176+
"- /language (or /lang): Set the transcription language.\n\n"
177177
"Let's get started! Send me a link or an audio file to begin."
178178
)
179179
await update.message.reply_text(welcome_message, parse_mode='HTML')
@@ -567,7 +567,7 @@ async def help_command(self, update: Update, context: CallbackContext) -> None:
567567
{file_upload_info}
568568
- Use /info to view the current settings, status, and jobs in queue.
569569
- Use /model to change the transcription model.
570-
- Use /language to change the model language in use
570+
- Use /language (or /lang) to change the model language in use
571571
(set language to <code>auto</code> for automatic language detection).
572572
573573
<i>TIP: Setting the language manually to the audio's language may improve accuracy and speed.</i>
@@ -853,7 +853,7 @@ async def info_command(self, update: Update, context: CallbackContext) -> None:
853853
f"<b>Current model in use:</b> {current_model}\n"
854854
f"(change with: /model)\n\n"
855855
f"<b>Selected transcription language:</b> {current_language}\n"
856-
f"(change with /language)\n\n"
856+
f"(change with /language or /lang)\n\n"
857857
f"<b>Bot uptime:</b> {str(uptime)}\n"
858858
f"<b>Bot started on:</b> {self.start_time.strftime('%Y-%m-%d %H:%M:%S')}\n\n"
859859
f"<b>Current active GPU status:</b>\n{gpu_status}\n\n"
@@ -879,8 +879,8 @@ def run(self):
879879
self.application.add_handler(CommandHandler('start', self.start_command))
880880
self.application.add_handler(CommandHandler(['help', 'about'], self.help_command))
881881
self.application.add_handler(CommandHandler('info', self.info_command))
882-
self.application.add_handler(CommandHandler('model', self.model_command))
883-
self.application.add_handler(CommandHandler('language', self.set_language_command))
882+
self.application.add_handler(CommandHandler('model', self.model_command))
883+
self.application.add_handler(CommandHandler(['language', 'lang'], self.set_language_command))
884884

885885
# Add specific message handlers next
886886
self.application.add_handler(MessageHandler(filters.AUDIO, self.handle_audio_file))

0 commit comments

Comments
 (0)