refactor: move default file outside of demo dir
This commit is contained in:
parent
cfd1707db0
commit
64b634c006
3 changed files with 3 additions and 2 deletions
1
pack.sh
1
pack.sh
|
|
@ -5,6 +5,7 @@ tar --exclude=".*" \
|
||||||
--exclude="node_modules" \
|
--exclude="node_modules" \
|
||||||
--exclude="outputs" \
|
--exclude="outputs" \
|
||||||
--exclude="inputs" \
|
--exclude="inputs" \
|
||||||
|
--exclude="demo" \
|
||||||
-cvzf $FILENAME simple-tts/
|
-cvzf $FILENAME simple-tts/
|
||||||
mv $FILENAME simple-tts/
|
mv $FILENAME simple-tts/
|
||||||
cd simple-tts
|
cd simple-tts
|
||||||
|
|
|
||||||
4
tts.py
4
tts.py
|
|
@ -43,7 +43,7 @@ prep_texts = [
|
||||||
]
|
]
|
||||||
|
|
||||||
dir_path = os.path.expanduser('~')
|
dir_path = os.path.expanduser('~')
|
||||||
installed_demo_file = f"{dir_path}/.local/lib/simple-tts/demo/tongue-twister.txt"
|
installed_demo_file = f"{dir_path}/.local/lib/simple-tts/tongue-twister.txt"
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description="Simple TTS - machine learning text-to-speech for your terminal", allow_abbrev=False)
|
parser = argparse.ArgumentParser(description="Simple TTS - machine learning text-to-speech for your terminal", allow_abbrev=False)
|
||||||
|
|
@ -177,7 +177,7 @@ def main():
|
||||||
|
|
||||||
if not default_exists:
|
if not default_exists:
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
file_path = os.path.join(script_dir, 'demo/tongue-twister.txt')
|
file_path = os.path.join(script_dir, 'tongue-twister.txt')
|
||||||
print(f"Using demo file: {file_path}")
|
print(f"Using demo file: {file_path}")
|
||||||
|
|
||||||
if os.path.isfile(file_path):
|
if os.path.isfile(file_path):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue