diff --git a/src/smeta_railway/ai/telegram_bot.py b/src/smeta_railway/ai/telegram_bot.py index 120666d..0cd3500 100644 --- a/src/smeta_railway/ai/telegram_bot.py +++ b/src/smeta_railway/ai/telegram_bot.py @@ -306,7 +306,8 @@ async def transcribe_voice(file_path: str) -> str: if not api_key: return "" - async with httpx.AsyncClient(timeout=30) as client: + proxy = os.environ.get("OPENAI_PROXY") or os.environ.get("HTTPS_PROXY") + async with httpx.AsyncClient(timeout=30, proxy=proxy) as client: with open(file_path, "rb") as f: resp = await client.post( "https://api.openai.com/v1/audio/transcriptions",