Skip to content

Issue occurred when using the same file to play different sounds #163

@BoogonClothman

Description

@BoogonClothman

[CMD]
Traceback (most recent call last):
File "e:\OwnProject\aivtuber\main.py", line 21, in (--> my proj)
asyncio.run(main())
^^^^^^
File "e:\OwnProject\aivtuber\main.py", line 18, in main (--> my proj)
service.generate_and_play(text)
File "e:\OwnProject\aivtuber\app\service\host.py", line 24, in generate_and_play (--> my proj)
asyncio.run(self.tts.tts_pipeline(generated_text))
File "E:\Anaconda3\envs\brollo-py3128\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\brollo-py3128\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\brollo-py3128\Lib\asyncio\base_events.py", line 686, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "e:\OwnProject\aivtuber\app\models\text_to_sound.py", line 19, in tts_pipeline
await self.generate_voice(text)
File "e:\OwnProject\aivtuber\app\models\text_to_sound.py", line 13, in generate_voice
await tts.save("./.voice/say.mp3")
File "E:\Anaconda3\envs\brollo-py3128\Lib\site-packages\edge_tts\communicate.py", line 506, in save
with metadata, open(audio_fname, "wb") as audio:
^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: './.voice/say.mp3'

[Details]

  1. playsound==1.2.2
  2. for the first time sound went well but for the second time i got the error
  3. i need to use the same file for i wanna use it to cooperate with Edge-TTS for streaming. i need to use less files and memory space

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions