vivekuppal / transcribe

Transcribe is a real time transcription, conversation, Language learning platform. It provides live transcripts from microphone and speaker. It generates a suggested conversation response using OpenAI's GPT API. It will read out the responses, simulating a real live conversation in English or another language.
https://abhinavuppal1.github.io/
MIT License
183 stars 44 forks source link

When you click the "Summarize" button in the bottom right corner of the interface, the error message may be a network connection problem or a problem with the Google Translate TTS (Text-to-Speech)API #210

Closed chenosyong closed 5 months ago

chenosyong commented 5 months ago

Error when attempting to get a response from LLM. list index out of range Exception in thread AudioResponse: Traceback (most recent call last): File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection raise err File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\util\connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn conn.connect() File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connection.py", line 616, in connect self.sock = sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connection.py", line 207, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x000002C30E247650>, 'Connection to translate.google.com timed out. (connect timeout=None)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\urllib3\util\retry.py", line 515, in increment raise MaxRetryError(pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: //TranslateWebserverUi/data/batchexecute (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000002C30E247650>, 'Connection to translate.google.com timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\gtts\tts.py", line 268, in stream r = s.send( ^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\requests\adapters.py", line 507, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /_/TranslateWebserverUi/data/batchexecute (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000002C30E247650>, 'Connection to translate.google.com timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\CY\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Users\CY\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "C:\Transcribe-main\transcribe-main\app\transcribe\audio_player.py", line 65, in play_audio_loop self.play_audio(speech=final_speech) File "C:\Transcribe-main\transcribe-main\app\transcribe\audio_player.py", line 40, in play_audio audio_obj.save(temp_audio_file[1]) File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\gtts\tts.py", line 335, in save self.write_to_fp(f) File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\gtts\tts.py", line 316, in write_to_fp for idx, decoded in enumerate(self.stream()): File "C:\Transcribe-main\transcribe-main\env\Lib\site-packages\gtts\tts.py", line 287, in stream raise gTTSError(tts=self) gtts.tts.gTTSError: Failed to connect. Probable cause: Unknown 345545

vivekuppal commented 5 months ago

The error seems to indicate that connection to translate.google.com timed out. What country are you based in? Run the following command and share output for it

ping translate.google.com

Want to see if translate.google.com is reachable from your computer. I am unsure at the moment what operation in Transcribe uses

As discussed in some of the other issues we are interacting on, it seems like you have undertaken some amount of customization of transcribe for specific use cases. It would be best to create a branch/ PR in transcribe, that would make collaborating much easier going forward.

chenosyong commented 5 months ago

China,正在 Ping www3.l.google.com [142.251.43.14] 具有 32 字节的数据: 请求超时。 请求超时。 请求超时。 请求超时。

vivekuppal commented 5 months ago

Seems like google.com is not reachable from the location you are in. The Suggest Response and Read functionality will not work in this case because gtts library needs to connect to google.com

The issue description states that problem was observed when clicking the summarize button. The details of the investigation seem to suggest that the problem is observed in functionality associated with Suggest Response and Read button.

It would be great for you to figure out when does the issue happen for you.

As stated in a different issue the best way to move forward is to discuss this in a different setting. There are 2 options to move forward

I see following ways to move forward

OR

OR

vivekuppal commented 5 months ago

invite sent