-
Notifications
You must be signed in to change notification settings - Fork 0
additional support for enabling noise isolation #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: typescript | ||
| run: npm ci | ||
|
|
||
| - name: Typecheck | ||
| working-directory: typescript | ||
| run: npm run typecheck | ||
|
|
||
| - name: Run tests | ||
| working-directory: typescript | ||
| run: npm test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,20 @@ export class CallsResource { | |
| async mute(callSid: string, status: 'mute' | 'unmute'): Promise<void> { | ||
| return this.update(callSid, { mute_status: status }); | ||
| } | ||
|
|
||
| /** Enable or disable server-side noise isolation. */ | ||
| async noiseIsolation( | ||
| callSid: string, | ||
| status: 'enable' | 'disable', | ||
| opts?: { vendor?: string; level?: number; model?: string } | ||
| ): Promise<void> { | ||
| return this.update(callSid, { | ||
| noise_isolation_status: status, | ||
| ...(opts?.vendor ? { noise_isolation_vendor: opts.vendor } : {}), | ||
| ...(opts?.level !== undefined ? { noise_isolation_level: opts.level } : {}), | ||
| ...(opts?.model ? { noise_isolation_model: opts.model } : {}), | ||
| }); | ||
| } | ||
|
Comment on lines
+150
to
+162
|
||
| } | ||
|
|
||
| export class ConferencesResource { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -277,6 +277,18 @@ export class Session extends EventEmitter { | |||||||||||||||||||||||||||||||||||||||
| this.injectCommand('mute:status', { mute_status: status }, callSid); | ||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| /** Enable or disable server-side noise isolation. */ | ||||||||||||||||||||||||||||||||||||||||
| injectNoiseIsolation( | ||||||||||||||||||||||||||||||||||||||||
| status: 'enable' | 'disable', | ||||||||||||||||||||||||||||||||||||||||
| opts?: { vendor?: string; level?: number; model?: string }, | ||||||||||||||||||||||||||||||||||||||||
| callSid?: string | ||||||||||||||||||||||||||||||||||||||||
| ): void { | ||||||||||||||||||||||||||||||||||||||||
| this.injectCommand('noiseIsolation:status', { | ||||||||||||||||||||||||||||||||||||||||
| noise_isolation_status: status, | ||||||||||||||||||||||||||||||||||||||||
| ...opts, | ||||||||||||||||||||||||||||||||||||||||
| }, callSid); | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+286
to
+289
|
||||||||||||||||||||||||||||||||||||||||
| this.injectCommand('noiseIsolation:status', { | |
| noise_isolation_status: status, | |
| ...opts, | |
| }, callSid); | |
| const payload: Record<string, unknown> = { | |
| noise_isolation_status: status, | |
| }; | |
| if (opts?.vendor !== undefined) { | |
| payload.noise_isolation_vendor = opts.vendor; | |
| } | |
| if (opts?.level !== undefined) { | |
| payload.noise_isolation_level = opts.level; | |
| } | |
| if (opts?.model !== undefined) { | |
| payload.noise_isolation_model = opts.model; | |
| } | |
| this.injectCommand('noiseIsolation:status', payload, callSid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
directionoption supports bothread(caller audio) andwrite(outbound audio), but the noiseIsolation description frames this as only applying to the caller's audio. Please update the description to reflect both directions (or clarify defaults/limitations) to avoid misleading schema consumers.