Ao tentar executar a transcrição relatou que a versão 1.0 não suporta mais a abertura de audio. Como posso resolver?
C:\Users\lucie\code> python main.pyC:\Users\lucie\code\main.py:22: SyntaxWarning: invalid escape sequence '\h' caminho_audio = 'podcast\hipsters_154_testes_short.mp3' Estou transcrevendo com Whispers Traceback (most recent call last): File "C:\Users\lucie\code\main.py", line 31, in main() File "C:\Users\lucie\code\main.py", line 28, in main transcricao_completa = openai_whisper_transcrever(caminho_audio, nome_arquivo, modelo_whisper, openai) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lucie\code\main.py", line 8, in openai_whisper_transcrever resposta = openai.Audio.transcribe( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lucie\code\codigo_alura\Lib\site-packages\openai\lib_old_api.py", line 39, in call raise APIRemovedInV1(symbol=self._symbol) openai.lib._old_api.APIRemovedInV1:
You tried to access openai.Audio, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
You can run openai migrate
to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28
A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742