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
export const speakText = async (text: string, apiKey: string): Promise<void> => { | |
let ws: WebSocket | null = null; | |
let audioContext: AudioContext | null = null; | |
let mediaStreamDestination: MediaStreamAudioDestinationNode | null = null; | |
let scriptProcessorNode: ScriptProcessorNode | null = null; | |
let audioElement: HTMLAudioElement | null = null; | |
let buffer: Float32Array = new Float32Array(); | |
const API_VERSION = "2024-06-10"; | |
const SAMPLE_RATE = 44100; |
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
--- | |
Description: AWS AppSync Notes API | |
Parameters: | |
APIName: | |
Type: String | |
Description: Name of the API - used to generate unique names for resources | |
MinLength: 3 | |
MaxLength: 20 | |
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$' |
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
// https://www.dropbox.com/s/dn7d71xifq4ydw0/Screen%20Shot%202015-06-27%20at%204.35.47%20pm.png?dl=0 | |
var allBoardSequences = ["01234 10423 24301 32140 43012", "01234 12340 20413 34021 43102" ..."01234 14302 23410 32041 40123"]; | |
var playersMoveToSquare = 17; | |
var Boxes = 1,2,3,4,5...25 | |
var tileColour = red; | |
var red = 1, blue = 2, yellow = 3, green = 4, purple = 5; | |
if (17 has red possiabilty) then -> |
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
addTiles : function(gameToken, playerToken, tiles){ | |
var unplayed = Tiles.find({ | |
"gameToken": gameToken, | |
tileState: "unplayed", | |
"owner": "none", | |
}).fetch(); | |
if (unplayed.length > 0){ | |
var selected = _.first(unplayed, tiles); |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |