ImNimboss / uberduck

A synchronous and asynchronous API wrapper for the UberDuck text-to-speech service (https://uberduck.ai) with 100% coverage and top-notch utilities.
MIT License
22 stars 5 forks source link

PermissionError: Errno 13 #4

Closed JFiguera15 closed 1 year ago

JFiguera15 commented 1 year ago

Description

I try running the simple console example program, but every time I execute it, it throws a string of errors, ending with a PermissionError: [Errno 13] Permission denied

Reproduction steps

Again, this is just the simple console example from examples.md, whenever I run it it gives the same error

Expected result

The soundbyte plays

Actual result

PS D:\Documentos\Programacion\Python\TTS> & d:/Documentos/Programacion/Python/TTS/.venv/Scripts/python.exe d:/Documentos/Programacion/Python/TTS/test.py
Enter speech: i am going insane
Enter voice or enter "LIST" to see list of voices: optimus-prime
Traceback (most recent call last):
  File "D:\Documentos\Programacion\Python\TTS\.venv\Lib\site-packages\pydub\playback.py", line 71, in play
    _play_with_ffplay(audio_segment)
  File "D:\Documentos\Programacion\Python\TTS\.venv\Lib\site-packages\pydub\playback.py", line 15, in _play_with_ffplay
    seg.export(f.name, "wav")
  File "D:\Documentos\Programacion\Python\TTS\.venv\Lib\site-packages\pydub\audio_segment.py", line 867, in export
    out_f, _ = _fd_or_path_or_tempfile(out_f, 'wb+')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Documentos\Programacion\Python\TTS\.venv\Lib\site-packages\pydub\utils.py", line 60, in _fd_or_path_or_tempfile
    fd = open(fd, mode=mode)
         ^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\myuser\\AppData\\Local\\Temp\\tmp4tj5y34n.wav'

Uberduck version

0.0.4

Operating system

Windows 11

Checklist

Additional context

I'm using visual studio code, I tried running it in admin mode and it still does not work.

JFiguera15 commented 1 year ago

Update for people in the future who may have the same problem: Installing simpleaudio fixed the issue, seemed to be a problem with pydub.

ImNimboss commented 1 year ago

Thank you for bringing this to everyone's attention, I'll see what's going on with pydub.

ImNimboss commented 1 year ago

Uberduck version v.0.0.5 has been released which adds simpleaudio to the list of dependencies, happy coding :)