From 80788d72d44e6fdc370609f6b396d2e5c5e5aeba Mon Sep 17 00:00:00 2001 From: anor Date: Mon, 30 Mar 2026 17:46:39 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BB=D0=BE=D0=B3=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=82=D1=80=D0=B0=D0=BD=D1=81?= =?UTF-8?q?=D0=BA=D1=80=D0=B8=D0=BF=D1=86=D0=B8=D0=B8=20+=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D0=BA=D0=B0=20=D0=B3=D0=BE=D0=BB=D0=BE=D1=81?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D0=B3=D0=BE=20=D0=B4=D0=BB=D1=8F=20Claude?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude получает "[Голосовой вопрос]:" чтобы не путать с запросом о голосовом распознавании. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/smeta_railway/ai/telegram_bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/smeta_railway/ai/telegram_bot.py b/src/smeta_railway/ai/telegram_bot.py index d9648c2..a401575 100644 --- a/src/smeta_railway/ai/telegram_bot.py +++ b/src/smeta_railway/ai/telegram_bot.py @@ -356,8 +356,12 @@ async def voice_message(update: Update, context: ContextTypes.DEFAULT_TYPE): await wait_msg.edit_text("Не удалось распознать речь.") return + logger.info(f"Voice transcription for user {user_id}: {text[:200]}") await wait_msg.edit_text(f"🤔 «{text[:100]}{'...' if len(text) > 100 else ''}»\nДумаю...") + # Prefix so Claude knows this is a transcribed voice question + text = f"[Голосовой вопрос пользователя]: {text}" + except Exception as e: logger.error(f"Voice transcription error: {e}") await wait_msg.edit_text(f"Ошибка распознавания: {e}")