Background In the previous practical session, we used Gemini 3.1 Flash Live to achieve speech recognition, and through the "side-attack" method of the Gemini 2.5 Live API, we barely achieved the text-to-speech (TTS) function. But in April 2026, Google officially released Gemini 3.1 Flash TTS . This is a native model specifically designed for audio output, no longer requiring a Live WebSocket, and can directly output high-quality audio through the standard generate_content process. As a developer, of course, you want to follow up immediately with a more elegant and native solution. This article will share how to upgrade the LINE Bot's text-to-speech summary function to Gemini 3.1 Native TTS, and the "asynchronous pit" encountered in the process. Technical Upgrade: From Live API to Native TTS The previous reading function was simulated using the Gemini 2.5 Live API. Although it was usable, it had several shortcomings: High complexity : Requires managing the WebSocket connection lifecycle.…