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

issue 19 fix, add ip as a parameter #22

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions demo_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def get(self):
return send_file(audio, mimetype="audio/wav")
else:
wav, _ = synthesizer.synthesize(text)
return send_file(wav, mimetype="audio/wav")
audio = io.BytesIO(wav)
return send_file(audio, mimetype="audio/wav")


class UI(MethodView):
Expand All @@ -101,6 +102,7 @@ def get(self):
parser.add_argument('--checkpoint', required=True,
help='Full path to model checkpoint')
parser.add_argument('--port', type=int, default=3000)
parser.add_argument('--ip', type=str, default='0.0.0.0')
parser.add_argument('--hparams', default='',
help='Hyperparameter overrides as a comma-separated list of name=value pairs')
parser.add_argument(
Expand All @@ -119,4 +121,4 @@ def get(self):
hparams.parse(args.hparams)
print(hparams_debug_string())
synthesizer.load(args.checkpoint)
app.run(host='0.0.0.0', port=args.port)
app.run(host=args.ip, port=args.port)