Skip to content

Commit

Permalink
Fix byte file UTF-8 error
Browse files Browse the repository at this point in the history
-Fixed other places where byte files were trying to be opened with UTF-8 encoding
  • Loading branch information
ThioJoe committed Jan 6, 2024
1 parent dae4710 commit e1feb4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/TTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@ def synthesize_dictionary(subsDict, langDict, skipSynthesize=False, secondPass=F

# If debug mode, write to files after Google TTS
if config['debug_mode'] and secondPass == False:
with open(filePathStem+"_p1.mp3", "wb", encoding='utf-8') as out:
with open(filePathStem+"_p1.mp3", "wb") as out:
out.write(audio)
elif config['debug_mode'] and secondPass == True:
with open(filePathStem+"_p2.mp3", "wb", encoding='utf-8') as out:
with open(filePathStem+"_p2.mp3", "wb") as out:
out.write(audio)

# If Azure TTS, use Azure API
Expand Down

0 comments on commit e1feb4c

Please sign in to comment.