Commit c34d936

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-05-02 15:22:39
fix(asr): longer TTL to avoid rate limit
1 parent 22769b2
Changed files (1)
src/asr/gemini_asr.py
@@ -60,7 +60,7 @@ async def gemini_stream_asr(client: Client, message: Message, path: str | Path,
             runtime_texts = beautify_llm_response(runtime_texts)
             if await count_without_entities(runtime_texts) <= TEXT_LENGTH:
                 if len(runtime_texts) > 5:  # start response if sentence is not empty
-                    await modify_progress(message=status, text=runtime_texts, detail_progress=True)
+                    await modify_progress(message=status, text=runtime_texts, detail_progress=True, ttl=10)
             else:  # transcriptions is too long, split it into multiple messages
                 parts = await smart_split(runtime_texts)
                 await modify_progress(message=status, text=blockquote(parts[0]), force_update=True)  # force send the first part