Skip to content

Commit c543b3a

Browse files
committed
added playback through Web Audio API
1 parent 398ffbb commit c543b3a

File tree

12 files changed

+606
-400
lines changed

12 files changed

+606
-400
lines changed

.github/workflows/build-natives.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ jobs:
7979
name: prebuilds-${{ runner.os == 'Windows' && 'win32' || runner.os == 'macOS' && 'darwin' || 'linux' }}-${{ matrix.architecture || 'x64' }}
8080
path: prebuilds/${{ runner.os == 'Windows' && 'win32' || runner.os == 'macOS' && 'darwin' || 'linux' }}-${{ matrix.architecture || 'x64' }}
8181

82+
- name: Copy prebuilt binaries
83+
run: |
84+
mkdir -p prebuilds/win32-${{ matrix.architecture || 'x64' }}
85+
mkdir -p prebuilds/darwin-${{ matrix.architecture || 'x64' }}
86+
mkdir -p prebuilds/linux-${{ matrix.architecture || 'x64' }}
87+
88+
# Windows
89+
touch prebuilds/win32-${{ matrix.architecture || 'x64' }}/node-microphone.marker
90+
91+
# macOS
92+
touch prebuilds/darwin-${{ matrix.architecture || 'x64' }}/node-microphone.marker
93+
94+
# Linux
95+
touch prebuilds/linux-${{ matrix.architecture || 'x64' }}/node-microphone.marker
96+
8297
package:
8398
needs: build
8499
runs-on: ubuntu-latest

esbuild.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ const buildOptions = {
2929
bundle: true,
3030
outfile: 'dist/extension.js',
3131
external: [
32-
'vscode',
33-
// Add native modules to external
34-
'speaker'
32+
'vscode'
33+
// speaker has been removed as we're using browser audio APIs now
3534
],
3635
format: 'cjs',
3736
platform: 'node',

package-lock.json

Lines changed: 2 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
"dependencies": {
111111
"@deepgram/sdk": "^3.0.0",
112112
"code": "^5.2.4",
113-
"speaker": "^0.5.5",
114113
"speex-resampler": "^3.0.1",
115114
"ws": "^8.16.0",
116115
"zod": "^3.22.4"
-77.5 KB
Binary file not shown.

scripts/prepare-native-modules.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as vscode from 'vscode';
1414
import { DeepgramService } from './services/deepgram-service'
1515
import { VoiceAgentService } from './services/voice-agent-service'
1616
import { ModeManagerService } from './services/mode-manager-service'
17-
import { MicrophoneWrapper, SpeakerWrapper } from './utils/native-module-wrapper';
17+
import { MicrophoneWrapper } from './utils/native-module-wrapper';
1818

1919
// Add type for QuickPick items
2020
interface PromptQuickPickItem extends vscode.QuickPickItem {

0 commit comments

Comments
 (0)