voice-router-dev 0.9.3 → 0.9.4

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.js CHANGED
@@ -4360,6 +4360,12 @@ var GladiaAdapter = class extends BaseAdapter {
4360
4360
  };
4361
4361
  this.baseUrl = "https://api.gladia.io";
4362
4362
  }
4363
+ initialize(config) {
4364
+ super.initialize(config);
4365
+ if (config.region) {
4366
+ this.streamingRegion = config.region;
4367
+ }
4368
+ }
4363
4369
  /**
4364
4370
  * Get axios config for generated API client functions
4365
4371
  * Configures headers and base URL using Gladia's x-gladia-key header
@@ -5021,9 +5027,10 @@ var GladiaAdapter = class extends BaseAdapter {
5021
5027
  async transcribeStream(options, callbacks) {
5022
5028
  this.validateConfig();
5023
5029
  const streamingRequest = this.buildStreamingRequest(options);
5030
+ const region = options?.region ?? this.streamingRegion;
5024
5031
  const initResponse = await streamingControllerInitStreamingSessionV2(
5025
5032
  streamingRequest,
5026
- options?.region ? { region: options.region } : void 0,
5033
+ region ? { region } : void 0,
5027
5034
  this.getAxiosConfig()
5028
5035
  );
5029
5036
  const { id, url: apiWsUrl } = initResponse.data;
package/dist/index.mjs CHANGED
@@ -4129,6 +4129,12 @@ var GladiaAdapter = class extends BaseAdapter {
4129
4129
  };
4130
4130
  this.baseUrl = "https://api.gladia.io";
4131
4131
  }
4132
+ initialize(config) {
4133
+ super.initialize(config);
4134
+ if (config.region) {
4135
+ this.streamingRegion = config.region;
4136
+ }
4137
+ }
4132
4138
  /**
4133
4139
  * Get axios config for generated API client functions
4134
4140
  * Configures headers and base URL using Gladia's x-gladia-key header
@@ -4790,9 +4796,10 @@ var GladiaAdapter = class extends BaseAdapter {
4790
4796
  async transcribeStream(options, callbacks) {
4791
4797
  this.validateConfig();
4792
4798
  const streamingRequest = this.buildStreamingRequest(options);
4799
+ const region = options?.region ?? this.streamingRegion;
4793
4800
  const initResponse = await streamingControllerInitStreamingSessionV2(
4794
4801
  streamingRequest,
4795
- options?.region ? { region: options.region } : void 0,
4802
+ region ? { region } : void 0,
4796
4803
  this.getAxiosConfig()
4797
4804
  );
4798
4805
  const { id, url: apiWsUrl } = initResponse.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voice-router-dev",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Universal speech-to-text router for Gladia, AssemblyAI, Deepgram, Azure, OpenAI Whisper, Speechmatics, Soniox, and ElevenLabs",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",