Skip to content

Comments

Nlu and api#74

Open
shakhyar wants to merge 6 commits intoLearnedVector:masterfrom
shakhyar:nlu_and_api
Open

Nlu and api#74
shakhyar wants to merge 6 commits intoLearnedVector:masterfrom
shakhyar:nlu_and_api

Conversation

@shakhyar
Copy link
Collaborator

To start the server, run server.py.

Use test.py to run inference from server(here, your computer is the server, and the url is http://127.0.0.1:5000/

To use inference from browser, after running server.py, go to http://127.0.0.1:5000/api/token/your_query
where token is just a random token for now, use anything, and your_query is your question.

Note: requirements.txt is a bit changed, you have to install a few more dependencies now.

def start_module(self):

while True:
pred = ww.start_wakeword_loop() # start prediction
Copy link
Collaborator Author

@shakhyar shakhyar Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change line 72 with the wakeword prediction function that returns 1 if wake word predicted, or 0 if not

# speech recognition class returns None if nothing is recognized, so if recognized, continue..
print('Listening...')
self.query = sr.run_speech_recognition() # listen

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change line 78 with speech recognition inference function, keep listening, if nothing detected, returns None, if detected, return the string to self.query variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant