Skip to content

Commit

Permalink
replace Microphone class (#48)
Browse files Browse the repository at this point in the history
* Add new Microphone stt stuff

* delete MicrophoneRecorder

* get microphne automatically when listening starts

* remove stt from Playthrough

* add demos

* use staging stt server

* update readme note on compatibility
  • Loading branch information
samuelbeard authored Jul 29, 2024
1 parent 0c86ff7 commit a01801d
Show file tree
Hide file tree
Showing 31 changed files with 6,437 additions and 4,337 deletions.
26 changes: 26 additions & 0 deletions demos/browser-stt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
35 changes: 35 additions & 0 deletions demos/browser-stt/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Charisma JS SDK Demo</title>
</head>
<body>
<div id="app">
<button onclick="start()">Start</button>
<div id="messages"></div>
<input
onkeypress="onKeyPress(event)"
placeholder="Type a message..."
id="reply-input"
/>
<button onclick="reply()">Send</button>
Record:
<input
type="checkbox"
id="record"
class="mic-checkbox"
onclick="toggleMicrophone(event)"
/>
<br />
<div id="transcript"></div>
</div>
<div>
<button onclick="toggleMuteBackgroundAudio()">
Mute Background Audio
</button>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions demos/browser-stt/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "test",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --port 3000",
"build": "tsc && vite build",
"preview": "vite preview"
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^5.3.1"
},
"dependencies": {
"@charisma-ai/sdk": "link:../.."
}
}
Loading

0 comments on commit a01801d

Please sign in to comment.