0

There is a project that waits for some time and plays audio from mp3(or wav). But, unfortunately, there was a difficulty in converting to exe. Is it possible to stuff an mp3(or wav) file into the exe so that the exe works separately from the folder (more precisely, without mp3(or wav) in the folder)? I use Auto-py-to-exe and Pyinstaller. I searched, but I didn't find the answer, thank you in advance

I tried to find an answer on various forums, but there was no answer anywhere

from playsound import playsound
from sound import Sound
import schedule
import requests
import random


def xaxax():
    Sound.volume_set(100)
    playsound("1.mp3")

def main():
    s55 = str(random.randint(13,50))
    s50 = str(random.randint(10,45))
    s45 = str(random.randint(10,40))
    schedule.every().friday.at(f'12:{s45}').do(xaxax)
    schedule.every().friday.at(f'09:{s55}').do(xaxax)
    schedule.every().monday.at(f'09:{s55}').do(xaxax)
    schedule.every().tuesday.at(f'10:{s50}').do(xaxax)
    schedule.every(5).seconds.do(xaxax)
    while True:
       schedule.run_pending()

if __name__ == "__main__":
    main()
Revil
  • 1
  • 1
  • [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – matszwecja Apr 20 '23 at 12:54
  • You're still missing lots of debugging details after the edit. How are you using this Auto-py-to-exe and Pyinstaller? What results do you get? (That's the missing CVE in [mcve]). Also, your Python file has too many superfluous lines for the M in MCVE. 2 lines should be enough for your question. – Joooeey Apr 25 '23 at 20:45
  • But first check out the duplicate. – Joooeey Apr 25 '23 at 20:47

0 Answers0