fix: логирование транскрипции + пометка голосового для Claude
Claude получает "[Голосовой вопрос]:" чтобы не путать с запросом о голосовом распознавании. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user