-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edc5eec
commit f56533f
Showing
7 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from flask_restful import Resource | ||
from flask_restful import request | ||
|
||
import base64 | ||
import common.speech_utility | ||
|
||
class Speech(Resource): | ||
def get(self): | ||
var = common.speech_utility.text_to_speech("test") | ||
args = request.args | ||
var = common.speech_utility.text_to_speech(str(args)) | ||
|
||
return {"speech":str(base64.b64encode(var), 'ascii', 'ignore')} | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import common.speech_utility | ||
import base64 | ||
|
||
def test_connection(): | ||
var = str(base64.b64encode(common.speech_utility.text_to_speech("test")), 'ascii', 'ignore') | ||
assert var.startswith("SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA//") | ||
|
||
|
||
|