Skip to content

Commit 93e0950

Browse files
authored
Add audio_format parameter if specified to Scribe WS URI (#319)
The ElevenLabs API documents an `audio_format` parameter that can be provided to the realtime API. While the SDK allows passing this parameter, it was previously unused in the construction of the URI.
1 parent e5bf5c0 commit 93e0950

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wrapper/realtime/scribe.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ export class ScribeRealtime {
169169
params.append("include_timestamps", options.includeTimestamps.toString());
170170
}
171171

172+
if (options.audioFormat !== undefined) {
173+
params.append("audio_format", options.audioFormat);
174+
}
175+
172176
const queryString = params.toString();
173177
return queryString ? `${baseUri}?${queryString}` : baseUri;
174178
}

0 commit comments

Comments
 (0)