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

Small tidy-ups #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions avs/alexa.py
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ def __init__(self, config=None):
self.last_activity = datetime.datetime.utcnow()
self._ping_time = None

def set_state_listner(self, listner):
def set_state_listener(self, listner):
self.state_listener = listner

def start(self):
@@ -478,7 +478,7 @@ def main():

config = None if len(sys.argv) < 2 else sys.argv[1]

audio = Audio()
audio = Audio(frames_size=1600)
alexa = Alexa(config)

audio.link(alexa)
4 changes: 2 additions & 2 deletions avs/auth.py
Original file line number Diff line number Diff line change
@@ -104,8 +104,8 @@ def main(config, output):
webserver = threading.Thread(target=login, args=(config, output))
webserver.daemon = True
webserver.start()
print("A web page should is opened. If not, go to http://127.0.0.1:3000 to start")
webbrowser.open('http://127.0.0.1:3000')
print("A web page should is opened. If not, go to http://localhost:3000 to start")
webbrowser.open('http://localhost:3000')

while webserver.is_alive():
try:
6 changes: 1 addition & 5 deletions avs/config.py
Original file line number Diff line number Diff line change
@@ -24,11 +24,7 @@ def load(configfile=None):
}

else:
return {
"product_id": "ReSpeaker",
"client_id": "amzn1.application-oa2-client.91b0cebd9074412cba1570a5dd03fc6e",
"client_secret": "fbd7a0e72953c1dd9a920670cf7f4115f694cd47c32a1513dc12a804c7f804e2"
}
raise Exception('Could not find config file')

with open(configfile, 'r') as f:
config = json.load(f)