Skip to content

Instantly share code, notes, and snippets.

View chadwallacehart's full-sized avatar

Chad Hart chadwallacehart

View GitHub Profile
"""
INSTRUCTIONS:
1. run audio through MacWhisper
2. download transcript as DOTE (which is a JSON file?)
3. run this script with the DOTE json file as the first argument
4. output will be in output.txt or the second argument if specified
"""
import json
import sys
@chadwallacehart
chadwallacehart / voxengine-pizzabot-demo
Created December 31, 2020 13:21
Voximplant VoxEngine Dialogflow example voicebot showing Dialogflow use on a phone call with DTMF entry
// Voximplant Demo showing how to order a Pizza using Dialogflow on the phone
// Includes DTMF entry, custom payloads, no input handling,
require(Modules.AI)
// Global Vars
const BOT_VOICE = Language.Premium.US_ENGLISH_MALE2
let dialogflow, call, hangup = false;
// Configurable via custom payload
require(Modules.AI)
require(Modules.Player)
require(Modules.Conference)
let dialogflow, call, hangup, conference
// Globals for noise
let ambientPlayer = VoxEngine.createURLPlayer("https://actions.google.com/sounds/v1/ambiences/coffee_shop.ogg", { "progressivePlayback": true, "loop": true })
// Inbound call processing
@chadwallacehart
chadwallacehart / voxengine_dialogflow_voicebot.js
Last active December 3, 2019 15:54
VoxEngine Dialogflow Voicebot example
// Voximplant's original Dialogflow integration template here: https://voximplant.com/blog/how-to-use-dialogflow-connector
require(Modules.AI)
require(Modules.Recorder)
const MAX_NO_INPUT_TIME = 10000 // Number of seconds of not hearing anything to wait before prompting the user again
const VOICEBOT_PHONE_NUMBER = 18576002939 // CallerID used to place a transfer call
let dialogflow, call, hangup = false
@chadwallacehart
chadwallacehart / laml.xml
Last active January 21, 2019 04:17
RecordAndForward
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>This call is being recorded</Say>
<Dial
record="record-from-answer-dual"
recordingStatusCallback="http://66b272b6.ngrok.io">
<Number>+16177948881</Number>
</Dial>
</Response>
@chadwallacehart
chadwallacehart / hello.laml
Created September 12, 2018 14:54
LAML Hello
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Message>Hello from SignalWire!</Message>
</Response>
@chadwallacehart
chadwallacehart / known_issues.md
Last active June 26, 2017 22:53
Click2Vox Known Issues

Date: 25 June, 2017

Error linking your SIP URI

The Click2Vox portal requires connectivity to Voxbone’s provisioning API to assign the SIP URI you entered. If you see this error your widget will use whichever SIP URI was successfully assigned last or the “echo@ivrs” echo service if you have not assigned a SIP URI. This error is caused by a lost of network connectivity. Please try saving your SIP URI again.

/**
* Basic REST API for toggling a Tessel Relay module
* Created by chad on 8/30/2014.
*/
var router = require('tiny-router'),
relaylib = require('relay-mono'),
tessel = require('tessel');
var relay = relaylib.use(tessel.port['C']);