jianchang512 / pyvideotrans

Translate the video from one language to another and add dubbing. 将视频从一种语言翻译为另一种语言,并支持api调用
https://pyvideotrans.com
GNU General Public License v3.0
10.06k stars 1.1k forks source link

translation with gemini and with azure is not working #476

Closed johnfelipe closed 1 month ago

johnfelipe commented 2 months ago
2024-07-18 09:34:13,371 - VideoTrans - INFO - Wait to modify original language subtitles / continue
2024-07-18 09:34:13,371 - VideoTrans - INFO - 14 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:14,380 - VideoTrans - INFO - 13 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:15,381 - VideoTrans - INFO - 12 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:16,388 - VideoTrans - INFO - 11 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:17,394 - VideoTrans - INFO - 10 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:18,408 - VideoTrans - INFO - 9 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:19,422 - VideoTrans - INFO - 8 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:20,430 - VideoTrans - INFO - 7 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:21,443 - VideoTrans - INFO - 6 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:22,455 - VideoTrans - INFO - 5 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:23,465 - VideoTrans - INFO - 4 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:24,479 - VideoTrans - INFO - 3 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:25,490 - VideoTrans - INFO - 2 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:26,502 - VideoTrans - INFO - 1 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:27,515 - VideoTrans - INFO - 0 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 09:34:28,518 - VideoTrans - INFO - translate_start
2024-07-18 09:34:30,530 - VideoTrans - INFO - Start translating
2024-07-18 09:34:31,031 - VideoTrans - INFO - 
[AzureGPT]请求数据:message=[{'role': 'system', 'content': '请将原文内容按字面意思翻译到English language,然后只输出译文,不要添加任何说明或引导词。\n\n**格式要求:**\n- 按行翻译原文,并生成该行对应的译文,确保原文行和译文行中的每个单词相互对应。\n- 有几行原文,必须生成几行译文。\n\n**内容要求:**\n- 翻译必须精简短小,避免长句。\n- 如果原文无法翻译,请原样返回,不得添加“无意义语句或不可翻译”等任何提示语。\n- 只输出译文即可,不要输出原文。\n\n**执行细节:**\n- 如果某行原文很短,在翻译后也仍然要保留该行,不得与上一行或下一行合并。\n- 原文换行处字符相对应的译文字符也必须换行。\n- 严格按照字面意思翻译,不要解释或回答原文内容。\n\n**最终目标:**\n- 提供格式与原文完全一致的高质量翻译结果。\n'}, {'role': 'assistant', 'content': 'Sure, please provide the text you need translated into English language'}, {'role': 'user', 'content': 'Esto funciona,\nPorque todas las tablas tienen distinta partición.\nEsto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré\nPara que podamos avanzar,\nPorque como te digo mi scope ahora es entender en vez de refactorizar\nCon el de reclasificación.\nEl primero, por ejemplo, es con respecto al conf,\nAl mortgage-based conf, con respecto a los esquemas.\nEs decir, espérate, yo te mando pantalla de eso.\n¿este lo has ejecutado?\nEste, no, no. dame un instante, yo te mando,\nPorque no quiero.\nMejor entonces en...\nTe mando por el chat la primera pregunta.\nEs que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede'}]
2024-07-18 09:34:31,951 - VideoTrans - ERROR - [AzureGPT]请求失败:Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 09:34:31,951 - VideoTrans - INFO - 2 retries after error
2024-07-18 09:34:41,972 - VideoTrans - INFO - 
[AzureGPT]请求数据:message=[{'role': 'system', 'content': '请将原文内容按字面意思翻译到English language,然后只输出译文,不要添加任何说明或引导词。\n\n**格式要求:**\n- 按行翻译原文,并生成该行对应的译文,确保原文行和译文行中的每个单词相互对应。\n- 有几行原文,必须生成几行译文。\n\n**内容要求:**\n- 翻译必须精简短小,避免长句。\n- 如果原文无法翻译,请原样返回,不得添加“无意义语句或不可翻译”等任何提示语。\n- 只输出译文即可,不要输出原文。\n\n**执行细节:**\n- 如果某行原文很短,在翻译后也仍然要保留该行,不得与上一行或下一行合并。\n- 原文换行处字符相对应的译文字符也必须换行。\n- 严格按照字面意思翻译,不要解释或回答原文内容。\n\n**最终目标:**\n- 提供格式与原文完全一致的高质量翻译结果。\n'}, {'role': 'assistant', 'content': 'Sure, please provide the text you need translated into English language'}, {'role': 'user', 'content': 'Esto funciona,\nPorque todas las tablas tienen distinta partición.\nEsto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré\nPara que podamos avanzar,\nPorque como te digo mi scope ahora es entender en vez de refactorizar\nCon el de reclasificación.\nEl primero, por ejemplo, es con respecto al conf,\nAl mortgage-based conf, con respecto a los esquemas.\nEs decir, espérate, yo te mando pantalla de eso.\n¿este lo has ejecutado?\nEste, no, no. dame un instante, yo te mando,\nPorque no quiero.\nMejor entonces en...\nTe mando por el chat la primera pregunta.\nEs que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede'}]
2024-07-18 09:34:42,707 - VideoTrans - ERROR - [AzureGPT]请求失败:Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 09:34:42,708 - VideoTrans - ERROR - [AzureGPT]翻译请求失败:err="2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}"
2024-07-18 09:34:42,731 - VideoTrans - ERROR - Error in subtitle translation:AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
Traceback (most recent call last):
  File "videotrans\task\step.py", line 162, in trans
  File "videotrans\translator\__init__.py", line 438, in run
  File "videotrans\translator\azure.py", line 180, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\trans_create.py", line 347, in trans
  File "videotrans\task\step.py", line 170, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\main_worker.py", line 262, in run
  File "videotrans\task\trans_create.py", line 351, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 09:34:42,732 - VideoTrans - ERROR - Error in subtitle translation:AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}

but both gemini and azure translate i have subscription

jianchang512 commented 2 months ago

Gemini is ok

jianchang512 commented 2 months ago

update to 2.10 and image

johnfelipe commented 2 months ago

gimini with 280 lines of srt:

  2024-07-18 10:06:52,082 - VideoTrans - INFO - Wait to modify original language subtitles / continue
  2024-07-18 10:06:52,082 - VideoTrans - INFO - 14 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:53,084 - VideoTrans - INFO - 13 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:54,095 - VideoTrans - INFO - 12 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:55,102 - VideoTrans - INFO - 11 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:56,108 - VideoTrans - INFO - 10 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:57,112 - VideoTrans - INFO - 9 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:58,120 - VideoTrans - INFO - 8 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:06:59,125 - VideoTrans - INFO - 7 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:00,130 - VideoTrans - INFO - 6 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:01,138 - VideoTrans - INFO - 5 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:02,142 - VideoTrans - INFO - 4 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:03,146 - VideoTrans - INFO - 3 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:04,155 - VideoTrans - INFO - 2 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:05,157 - VideoTrans - INFO - 1 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:06,168 - VideoTrans - INFO - 0 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
  2024-07-18 10:07:07,177 - VideoTrans - INFO - translate_start
  2024-07-18 10:07:09,185 - VideoTrans - INFO - Start translating
  2024-07-18 10:07:15,891 - VideoTrans - INFO - [Gemini]请求发送:message='请将原文内容按字面意思翻译到English language,然后只输出译文,不要添加任何说明或引导词。\n\n**格式要求:**\n- 按行翻译原文,并生成该行对应的译文,确保原文行和译文行中的每个单词相互对应。\n- 有几行原文,必须生成几行译文。\n\n**内容要求:**\n- 翻译必须精简短小,避免长句。\n- 只输出译文即可,不要输出原文。\n\n**执行细节:**\n- 如果某行原文很短,在翻译后也仍然要保留该行,不得与上一行或下一行合并。\n- 原文换行处字符相对应的译文字符也必须换行。\n- 严格按照字面意思翻译,不要解释或回答原文内容。\n\n**最终目标:**\n- 提供格式与原文完全一致的高质量翻译结果。\n\n原文: """Esto funciona, .\nPorque todas las tablas tienen distinta partición. .\nEsto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré .\nPara que podamos avanzar, .\nPorque como te digo mi scope ahora es entender en vez de refactorizar .\nCon el de reclasificación. .\nEl primero, por ejemplo, es con respecto al conf, .\nAl mortgage-based conf, con respecto a los esquemas. .\nEs decir, espérate, yo te mando pantalla de eso. .\n¿este lo has ejecutado? .\nEste, no, no. dame un instante, yo te mando, .\nPorque no quiero. .\nMejor entonces en... .\nTe mando por el chat la primera pregunta. .\nEs que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede ."""\n\n译文:\n'
  2024-07-18 10:07:15,892 - VideoTrans - INFO - [Gemini]返回:result='"""This works, .\nBecause all the tables have different partition. .\nThis is the review because I have like 7 questions of certain files that I did not. .\nSo that we can move forward, .\nBecause as I tell you my scope now is to understand instead of refactoring .\nWith the one of reclassification. .\nThe first one, for example, is with respect to the conf, .\nTo the mortgage-based conf, with respect to the schemas. .\nThat is, wait, I send you a screenshot of that. .\nHave you run this one? .\nThis one, no, no. give me a moment, I send you, .\nBecause I don\'t want to. .\nBetter then in... .\nI send you the first question by chat. .\nIt is that I have retained in the route of the schemas because of the template you can not ."""'
  2024-07-18 10:07:15,893 - VideoTrans - INFO - sep_res=['This works, .', 'Because all the tables have different partition. .', 'This is the review because I have like 7 questions of certain files that I did not. .', 'So that we can move forward, .', 'Because as I tell you my scope now is to understand instead of refactoring .', 'With the one of reclassification. .', 'The first one, for example, is with respect to the conf, .', 'To the mortgage-based conf, with respect to the schemas. .', 'That is, wait, I send you a screenshot of that. .', 'Have you run this one? .', 'This one, no, no. give me a moment, I send you, .', 'Because I dont want to. .', 'Better then in... .', 'I send you the first question by chat. .', 'It is that I have retained in the route of the schemas because of the template you can not .']
  it=['Esto funciona, . ', 'Porque todas las tablas tienen distinta partición. . ', 'Esto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré . ', 'Para que podamos avanzar, . ', 'Porque como te digo mi scope ahora es entender en vez de refactorizar . ', 'Con el de reclasificación. . ', 'El primero, por ejemplo, es con respecto al conf, . ', 'Al mortgage-based conf, con respecto a los esquemas. . ', 'Es decir, espérate, yo te mando pantalla de eso. . ', '¿este lo has ejecutado? . ', 'Este, no, no. dame un instante, yo te mando, . ', 'Porque no quiero. . ', 'Mejor entonces en... . ', 'Te mando por el chat la primera pregunta. . ', 'Es que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede . ']
  2024-07-18 10:07:15,894 - VideoTrans - INFO - This works, .

  2024-07-18 10:07:15,894 - VideoTrans - INFO - Start translating 1 
  2024-07-18 10:07:15,895 - VideoTrans - INFO - Because all the tables have different partition. .

  2024-07-18 10:07:15,896 - VideoTrans - INFO - Start translating 2 
  2024-07-18 10:07:15,896 - VideoTrans - INFO - This is the review because I have like 7 questions of certain files that I did not. .

  2024-07-18 10:07:15,897 - VideoTrans - INFO - Start translating 3 
  2024-07-18 10:07:15,898 - VideoTrans - INFO - So that we can move forward, .

  2024-07-18 10:07:15,899 - VideoTrans - INFO - Start translating 4 
  2024-07-18 10:07:15,900 - VideoTrans - INFO - Because as I tell you my scope now is to understand instead of refactoring .

  2024-07-18 10:07:15,902 - VideoTrans - INFO - Start translating 5 
  2024-07-18 10:07:15,903 - VideoTrans - INFO - With the one of reclassification. .

  2024-07-18 10:07:15,904 - VideoTrans - INFO - Start translating 6 
  2024-07-18 10:07:15,905 - VideoTrans - INFO - The first one, for example, is with respect to the conf, .

  2024-07-18 10:07:15,905 - VideoTrans - INFO - Start translating 7 
  2024-07-18 10:07:15,905 - VideoTrans - INFO - To the mortgage-based conf, with respect to the schemas. .

  2024-07-18 10:07:15,906 - VideoTrans - INFO - Start translating 8 
  2024-07-18 10:07:15,906 - VideoTrans - INFO - That is, wait, I send you a screenshot of that. .

  2024-07-18 10:07:15,906 - VideoTrans - INFO - Start translating 9 
  2024-07-18 10:07:15,907 - VideoTrans - INFO - Have you run this one? .

  2024-07-18 10:07:15,907 - VideoTrans - INFO - Start translating 10 
  2024-07-18 10:07:15,907 - VideoTrans - INFO - This one, no, no. give me a moment, I send you, .

  2024-07-18 10:07:15,908 - VideoTrans - INFO - Start translating 11 
  2024-07-18 10:07:15,908 - VideoTrans - INFO - Because I dont want to. .

  2024-07-18 10:07:15,908 - VideoTrans - INFO - Start translating 12 
  2024-07-18 10:07:15,908 - VideoTrans - INFO - Better then in... .

  2024-07-18 10:07:15,909 - VideoTrans - INFO - Start translating 13 
  2024-07-18 10:07:15,909 - VideoTrans - INFO - I send you the first question by chat. .

  2024-07-18 10:07:15,909 - VideoTrans - INFO - Start translating 14 
  2024-07-18 10:07:15,910 - VideoTrans - INFO - It is that I have retained in the route of the schemas because of the template you can not .

  2024-07-18 10:07:15,910 - VideoTrans - INFO - Start translating 15 
  2024-07-18 10:07:17,701 - VideoTrans - ERROR - [Gemini]请求失败:error='500 An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting'
  2024-07-18 10:07:19,260 - VideoTrans - ERROR - [Gemini]请求失败:error='500 An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting'
  2024-07-18 10:07:19,260 - VideoTrans - INFO - 2 retries after error
  2024-07-18 10:07:29,428 - VideoTrans - ERROR - [Gemini]请求失败:error='429 Resource has been exhausted (e.g. check quota).'
  2024-07-18 10:08:29,431 - VideoTrans - ERROR - [Gemini]翻译请求失败:err='2 retries after error persists :429 Resource has been exhausted (e.g. check quota).'
  2024-07-18 10:08:29,455 - VideoTrans - ERROR - Error in subtitle translation:Gemini:2 retries after error persists :429 Resource has been exhausted (e.g. check quota).
  Traceback (most recent call last):
    File "videotrans\task\step.py", line 162, in trans
    File "videotrans\translator\__init__.py", line 438, in run
    File "videotrans\translator\gemini.py", line 237, in trans
  Exception: Gemini:2 retries after error persists :429 Resource has been exhausted (e.g. check quota).

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "videotrans\task\trans_create.py", line 347, in trans
    File "videotrans\task\step.py", line 170, in trans
  Exception: Gemini:2 retries after error persists :429 Resource has been exhausted (e.g. check quota).

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "videotrans\task\main_worker.py", line 262, in run
    File "videotrans\task\trans_create.py", line 351, in trans
  Exception: Gemini:2 retries after error persists :429 Resource has been exhausted (e.g. check quota).
  2024-07-18 10:08:29,456 - VideoTrans - ERROR - Error in subtitle translation:Gemini:2 retries after error persists :429 Resource has been exhausted (e.g. check quota).
johnfelipe commented 2 months ago

same file with 280 lines of srt - azure with your suggestion 3.5 turbo:

280
00:23:30,680 --> 00:23:32,880
me avisas entonces. Gracias Víctor

2024-07-18 10:40:56,473 - VideoTrans - INFO - Wait to modify original language subtitles / continue
2024-07-18 10:40:56,473 - VideoTrans - INFO - 14 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:40:57,484 - VideoTrans - INFO - 13 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:40:58,486 - VideoTrans - INFO - 12 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:40:59,496 - VideoTrans - INFO - 11 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:00,499 - VideoTrans - INFO - 10 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:01,507 - VideoTrans - INFO - 9 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:02,514 - VideoTrans - INFO - 8 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:03,523 - VideoTrans - INFO - 7 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:04,526 - VideoTrans - INFO - 6 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:05,539 - VideoTrans - INFO - 5 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:06,550 - VideoTrans - INFO - 4 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:07,558 - VideoTrans - INFO - 3 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:08,559 - VideoTrans - INFO - 2 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:09,569 - VideoTrans - INFO - 1 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:10,581 - VideoTrans - INFO - 0 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-07-18 10:41:11,594 - VideoTrans - INFO - translate_start
2024-07-18 10:41:13,607 - VideoTrans - INFO - Start translating
2024-07-18 10:41:14,068 - VideoTrans - INFO - 
[AzureGPT]请求数据:message=[{'role': 'system', 'content': '请将原文内容按字面意思翻译到English language,然后只输出译文,不要添加任何说明或引导词。\n\n**格式要求:**\n- 按行翻译原文,并生成该行对应的译文,确保原文行和译文行中的每个单词相互对应。\n- 有几行原文,必须生成几行译文。\n\n**内容要求:**\n- 翻译必须精简短小,避免长句。\n- 如果原文无法翻译,请原样返回,不得添加“无意义语句或不可翻译”等任何提示语。\n- 只输出译文即可,不要输出原文。\n\n**执行细节:**\n- 如果某行原文很短,在翻译后也仍然要保留该行,不得与上一行或下一行合并。\n- 原文换行处字符相对应的译文字符也必须换行。\n- 严格按照字面意思翻译,不要解释或回答原文内容。\n\n**最终目标:**\n- 提供格式与原文完全一致的高质量翻译结果。\n'}, {'role': 'assistant', 'content': 'Sure, please provide the text you need translated into English language'}, {'role': 'user', 'content': 'Esto funciona,\nPorque todas las tablas tienen distinta partición.\nEsto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré\nPara que podamos avanzar,\nPorque como te digo mi scope ahora es entender en vez de refactorizar\nCon el de reclasificación.\nEl primero, por ejemplo, es con respecto al conf,\nAl mortgage-based conf, con respecto a los esquemas.\nEs decir, espérate, yo te mando pantalla de eso.\n¿este lo has ejecutado?\nEste, no, no. dame un instante, yo te mando,\nPorque no quiero.\nMejor entonces en...\nTe mando por el chat la primera pregunta.\nEs que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede'}]
2024-07-18 10:41:14,724 - VideoTrans - ERROR - [AzureGPT]请求失败:Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 10:41:14,724 - VideoTrans - INFO - 2 retries after error
2024-07-18 10:41:24,745 - VideoTrans - INFO - 
[AzureGPT]请求数据:message=[{'role': 'system', 'content': '请将原文内容按字面意思翻译到English language,然后只输出译文,不要添加任何说明或引导词。\n\n**格式要求:**\n- 按行翻译原文,并生成该行对应的译文,确保原文行和译文行中的每个单词相互对应。\n- 有几行原文,必须生成几行译文。\n\n**内容要求:**\n- 翻译必须精简短小,避免长句。\n- 如果原文无法翻译,请原样返回,不得添加“无意义语句或不可翻译”等任何提示语。\n- 只输出译文即可,不要输出原文。\n\n**执行细节:**\n- 如果某行原文很短,在翻译后也仍然要保留该行,不得与上一行或下一行合并。\n- 原文换行处字符相对应的译文字符也必须换行。\n- 严格按照字面意思翻译,不要解释或回答原文内容。\n\n**最终目标:**\n- 提供格式与原文完全一致的高质量翻译结果。\n'}, {'role': 'assistant', 'content': 'Sure, please provide the text you need translated into English language'}, {'role': 'user', 'content': 'Esto funciona,\nPorque todas las tablas tienen distinta partición.\nEsto es la revisión porque tengo como 7 preguntas de ciertos archivos que no logré\nPara que podamos avanzar,\nPorque como te digo mi scope ahora es entender en vez de refactorizar\nCon el de reclasificación.\nEl primero, por ejemplo, es con respecto al conf,\nAl mortgage-based conf, con respecto a los esquemas.\nEs decir, espérate, yo te mando pantalla de eso.\n¿este lo has ejecutado?\nEste, no, no. dame un instante, yo te mando,\nPorque no quiero.\nMejor entonces en...\nTe mando por el chat la primera pregunta.\nEs que tengo reteñido en la ruta de los esquemas pues de la plantilla no se puede'}]
2024-07-18 10:41:25,360 - VideoTrans - ERROR - [AzureGPT]请求失败:Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 10:41:25,361 - VideoTrans - ERROR - [AzureGPT]翻译请求失败:err="2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}"
2024-07-18 10:41:25,395 - VideoTrans - ERROR - Error in subtitle translation:AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
Traceback (most recent call last):
  File "videotrans\task\step.py", line 162, in trans
  File "videotrans\translator\__init__.py", line 438, in run
  File "videotrans\translator\azure.py", line 180, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\trans_create.py", line 347, in trans
  File "videotrans\task\step.py", line 170, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\main_worker.py", line 262, in run
  File "videotrans\task\trans_create.py", line 351, in trans
Exception: AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
2024-07-18 10:41:25,396 - VideoTrans - ERROR - Error in subtitle translation:AzureGPT:2 retries after error persists :Error code: 401 - {'error': {'code': '401', 'message': 'The ChatCompletions_Create Operation under Azure OpenAI API version 2023-05-15 is not supported with the current subscription key and pricing tier TextTranslator.S1.'}}
jianchang512 commented 2 months ago

429 Resource has been exhausted

update to 2.10

johnfelipe commented 2 months ago

I already update Then how fix that issue? For u which translation service is better?

El jue, 18 jul 2024, 11:08 a. m., okmyworld @.***> escribió:

429 Resource has been exhausted

update to 2.10

— Reply to this email directly, view it on GitHub https://github.com/jianchang512/pyvideotrans/issues/476#issuecomment-2236956906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIWFFHHCNZDWF5DVKDKVDZM7R7JAVCNFSM6AAAAABLC2IFCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWHE2TMOJQGY . You are receiving this because you authored the thread.Message ID: @.***>

jianchang512 commented 2 months ago

Check the Azure documentation to change the name of the supported model.

The Gemini one is for exceeding limits, check billing information

jianchang512 commented 2 months ago

https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models

jianchang512 commented 2 months ago

image