This file contains hidden or 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
import { vcr, Voice, State } from "@vonage/vcr-sdk"; | |
import { Vonage } from "@vonage/server-sdk"; | |
import express from "express"; | |
import OpenAI from 'openai'; | |
import pug from 'pug'; | |
import fs from 'fs'; | |
const app = express(); | |
const port = process.env.VCR_PORT; |
This file contains hidden or 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
#!/bin/bash | |
# Ensure a parent directory is specified | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <parent_directory>" | |
exit 1 | |
fi | |
parent_dir="$1" |
This file contains hidden or 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
func startAnalysingAudio() { | |
let inputNode = audioEngine.inputNode | |
let bus = 0 | |
inputNode.installTap(onBus: bus, bufferSize: 2048, format: inputNode.inputFormat(forBus: bus)) { (buffer: AVAudioPCMBuffer!, time: AVAudioTime!) -> Void in | |
self.session.matchStreamingBuffer(buffer, at: time) | |
} | |
audioEngine.prepare() | |
try! audioEngine.start() | |
} |