Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker Setup #16

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: break out current dir
  • Loading branch information
DuncanLHS committed Mar 3, 2024
commit f1d63a3148b9edaade6ec51ba445d0cbff875c23
7 changes: 4 additions & 3 deletions engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import time
from glados import tts_runner

sys.path.insert(0, os.getcwd()+'/glados_tts')
current_dir = os.getcwd()
sys.path.insert(0, current_dir+'/glados_tts')

print("\033[1;94mINFO:\033[;97m Initializing TTS Engine...")

Expand Down Expand Up @@ -48,7 +49,7 @@ def synthesize(text):
filename = filename.replace("!", "")
filename = filename.replace("°c", "degrees celcius")
filename = filename.replace(",", "")+".wav"
file = os.getcwd()+'/audio/'+filename
file = current_dir+'/audio/'+filename

# Check for Local Cache
if(os.path.isfile(file)):
Expand All @@ -61,7 +62,7 @@ def synthesize(text):
# Generate New Sample
key = str(time.time())[7:]
if(glados_tts(line, key)):
tempfile = os.getcwd()+'/audio/GLaDOS-tts-temp-output-'+key+'.wav'
tempfile = current_dir+'/audio/GLaDOS-tts-temp-output-'+key+'.wav'

# If the line isn't too long, store in cache
if(len(line) < 200 and CACHE):
Expand Down