voice-router-dev 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4975,6 +4975,12 @@ declare const StreamingSupportedBitDepthEnum: {
4975
4975
  /**
4976
4976
  * ListenV1EncodingParameter type definition
4977
4977
  */
4978
+ /**
4979
+ * ListenV1EncodingParameter type definition
4980
+ */
4981
+ /**
4982
+ * ListenV1EncodingParameter type definition
4983
+ */
4978
4984
  type ListenV1EncodingParameter = typeof ListenV1EncodingParameter[keyof typeof ListenV1EncodingParameter];
4979
4985
  declare const ListenV1EncodingParameter: {
4980
4986
  readonly linear16: "linear16";
@@ -5403,6 +5409,12 @@ declare function createVoiceRouter(config: VoiceRouterConfig, adapters?: Transcr
5403
5409
  /**
5404
5410
  * SpeakV1EncodingParameter type definition
5405
5411
  */
5412
+ /**
5413
+ * SpeakV1EncodingParameter type definition
5414
+ */
5415
+ /**
5416
+ * SpeakV1EncodingParameter type definition
5417
+ */
5406
5418
  type SpeakV1EncodingParameter = typeof SpeakV1EncodingParameter[keyof typeof SpeakV1EncodingParameter];
5407
5419
  declare const SpeakV1EncodingParameter: {
5408
5420
  readonly linear16: "linear16";
@@ -5437,6 +5449,12 @@ declare const SpeakV1EncodingParameter: {
5437
5449
  /**
5438
5450
  * SpeakV1ContainerParameter type definition
5439
5451
  */
5452
+ /**
5453
+ * SpeakV1ContainerParameter type definition
5454
+ */
5455
+ /**
5456
+ * SpeakV1ContainerParameter type definition
5457
+ */
5440
5458
  type SpeakV1ContainerParameter = typeof SpeakV1ContainerParameter[keyof typeof SpeakV1ContainerParameter];
5441
5459
  declare const SpeakV1ContainerParameter: {
5442
5460
  readonly none: "none";
@@ -5470,6 +5488,12 @@ declare const SpeakV1ContainerParameter: {
5470
5488
  /**
5471
5489
  * SpeakV1SampleRateParameter type definition
5472
5490
  */
5491
+ /**
5492
+ * SpeakV1SampleRateParameter type definition
5493
+ */
5494
+ /**
5495
+ * SpeakV1SampleRateParameter type definition
5496
+ */
5473
5497
  type SpeakV1SampleRateParameter = typeof SpeakV1SampleRateParameter[keyof typeof SpeakV1SampleRateParameter];
5474
5498
  declare const SpeakV1SampleRateParameter: {
5475
5499
  readonly NUMBER_16000: 16000;
package/dist/index.d.ts CHANGED
@@ -4975,6 +4975,12 @@ declare const StreamingSupportedBitDepthEnum: {
4975
4975
  /**
4976
4976
  * ListenV1EncodingParameter type definition
4977
4977
  */
4978
+ /**
4979
+ * ListenV1EncodingParameter type definition
4980
+ */
4981
+ /**
4982
+ * ListenV1EncodingParameter type definition
4983
+ */
4978
4984
  type ListenV1EncodingParameter = typeof ListenV1EncodingParameter[keyof typeof ListenV1EncodingParameter];
4979
4985
  declare const ListenV1EncodingParameter: {
4980
4986
  readonly linear16: "linear16";
@@ -5403,6 +5409,12 @@ declare function createVoiceRouter(config: VoiceRouterConfig, adapters?: Transcr
5403
5409
  /**
5404
5410
  * SpeakV1EncodingParameter type definition
5405
5411
  */
5412
+ /**
5413
+ * SpeakV1EncodingParameter type definition
5414
+ */
5415
+ /**
5416
+ * SpeakV1EncodingParameter type definition
5417
+ */
5406
5418
  type SpeakV1EncodingParameter = typeof SpeakV1EncodingParameter[keyof typeof SpeakV1EncodingParameter];
5407
5419
  declare const SpeakV1EncodingParameter: {
5408
5420
  readonly linear16: "linear16";
@@ -5437,6 +5449,12 @@ declare const SpeakV1EncodingParameter: {
5437
5449
  /**
5438
5450
  * SpeakV1ContainerParameter type definition
5439
5451
  */
5452
+ /**
5453
+ * SpeakV1ContainerParameter type definition
5454
+ */
5455
+ /**
5456
+ * SpeakV1ContainerParameter type definition
5457
+ */
5440
5458
  type SpeakV1ContainerParameter = typeof SpeakV1ContainerParameter[keyof typeof SpeakV1ContainerParameter];
5441
5459
  declare const SpeakV1ContainerParameter: {
5442
5460
  readonly none: "none";
@@ -5470,6 +5488,12 @@ declare const SpeakV1ContainerParameter: {
5470
5488
  /**
5471
5489
  * SpeakV1SampleRateParameter type definition
5472
5490
  */
5491
+ /**
5492
+ * SpeakV1SampleRateParameter type definition
5493
+ */
5494
+ /**
5495
+ * SpeakV1SampleRateParameter type definition
5496
+ */
5473
5497
  type SpeakV1SampleRateParameter = typeof SpeakV1SampleRateParameter[keyof typeof SpeakV1SampleRateParameter];
5474
5498
  declare const SpeakV1SampleRateParameter: {
5475
5499
  readonly NUMBER_16000: 16000;
package/dist/index.js CHANGED
@@ -2887,7 +2887,7 @@ var AssemblyAIAdapter = class extends BaseAdapter {
2887
2887
  throw new Error("API key is required for streaming");
2888
2888
  }
2889
2889
  const sampleRate = options?.sampleRate || 16e3;
2890
- const encoding = options?.encoding || "pcm_s16le";
2890
+ const encoding = options?.encoding ? mapEncodingToProvider(options.encoding, "assemblyai") : "pcm_s16le";
2891
2891
  const wsUrl = `${this.wsBaseUrl}?sample_rate=${sampleRate}&encoding=${encoding}`;
2892
2892
  const ws = new import_ws2.default(wsUrl, {
2893
2893
  headers: {