Skip to content

Commit

Permalink
Folder existence checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaan-Kazi committed Oct 2, 2024
1 parent 09182d6 commit 6bd1a1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ tts/
build/
dist/
settings.json
TextToSpeech.spec
10 changes: 7 additions & 3 deletions Text To Speech.py → TextToSpeech.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,13 @@ def getKey():

if ("list" == cmd.replace("play ", "")):
print("\nCurrently available special sound effects: ")

for specialFile in os.listdir("special"):
print("- " + specialFile)

if (os.path.isdir("special")):
for specialFile in os.listdir("special"):
print("- " + specialFile)
else:
print("No special sound effects available")
os.mkdir("special")
elif (os.path.isfile(playFile) == True):
playSound(str(playFile), 1.0)
print("Playing file: " + playFile)
Expand Down
Binary file removed special/example.wav
Binary file not shown.

0 comments on commit 6bd1a1d

Please sign in to comment.