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
#include <Arduino.h> | |
#include <ArduinoJson.h> | |
void setup() { | |
Serial.begin(115200); | |
delay(1000); | |
int waittime = 3; //wait in seconds | |
Serial.println("Waiting " + String(waittime) + " seconds"); | |
for (int i=0; i<waittime; i++) | |
{ |
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
#! /usr/bin/env python | |
# Purpose: Sends an utterance to mycroft as if spoken | |
# Usage: python sendutt.py "utterance string goes here" | |
# Example usage from command line: python sendutt.py "what time is it" | |
#example data format--> data ='{"utterances": ["what time is it"],"lang":"en-us"}' | |
#example message format--> message = '{"type": "' + type + '", "data": ' + data +'}' | |
#example fully spelled out websocket message--> | |
# result = ws.send('{"type": "'"recognizer_loop:utterance"'", "data": ''{"utterances": ["what time is it"],"lang":"en-us"}''}') |