-
Notifications
You must be signed in to change notification settings - Fork 0
Platform Abstraction
Robin Wohlers-Reichel edited this page Nov 2, 2018
·
5 revisions
irs.photo(callback: fn(image))
- callback -> called with either base64EncodedImage or Null as parameter
irs.listen(triggers: [string], timeout: int, callback: fn(int))
- triggers: an array of words which the system should listen for
- timeout: the maximum time to wait in milliseconds
- callback: See below
- 0 to n: listen triggered on the nth word in the 'triggers' array
- -1: timeout was reached before a trigger word was detected
- -2: unable to access the microphone
- -3: unknown error
irs.say(phrase: string)
phrase: The phrase to say
irs.identify() -> int
- 0 if there is no platform abstraction available
- 1 if the platform is the robot
- 2 if the platform is chrome