@volley/recognition-client-sdk 0.1.423 → 0.1.424

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.
@@ -1146,6 +1146,10 @@ declare class RealTimeTwoWayWebSocketRecognitionClient extends WebSocketAudioCli
1146
1146
  private connectWithRetry;
1147
1147
  sendAudio(audioData: ArrayBuffer | ArrayBufferView | Blob): void;
1148
1148
  private sendAudioInternal;
1149
+ /**
1150
+ * Only active ehwne client is in READY state. otherwise it will return immediately.
1151
+ * @returns Promise that resolves when the recording is stopped
1152
+ */
1149
1153
  stopRecording(): Promise<void>;
1150
1154
  stopAbnormally(): void;
1151
1155
  getAudioUtteranceId(): string;
@@ -1822,6 +1822,10 @@ declare class RealTimeTwoWayWebSocketRecognitionClient extends WebSocketAudioCli
1822
1822
  private connectWithRetry;
1823
1823
  sendAudio(audioData: ArrayBuffer | ArrayBufferView | Blob): void;
1824
1824
  private sendAudioInternal;
1825
+ /**
1826
+ * Only active ehwne client is in READY state. otherwise it will return immediately.
1827
+ * @returns Promise that resolves when the recording is stopped
1828
+ */
1825
1829
  stopRecording(): Promise<void>;
1826
1830
  stopAbnormally(): void;
1827
1831
  getAudioUtteranceId(): string;
package/dist/index.js CHANGED
@@ -5514,9 +5514,13 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
5514
5514
  }
5515
5515
  }
5516
5516
  }
5517
+ /**
5518
+ * Only active ehwne client is in READY state. otherwise it will return immediately.
5519
+ * @returns Promise that resolves when the recording is stopped
5520
+ */
5517
5521
  async stopRecording() {
5518
5522
  if (this.state !== "ready" /* READY */) {
5519
- this.log("debug", "stopRecording called but not in READY state", { state: this.state });
5523
+ this.log("warn", "stopRecording called but not in READY state", { state: this.state });
5520
5524
  return;
5521
5525
  }
5522
5526
  this.log("debug", "Stopping recording");
@@ -6235,7 +6239,7 @@ var SimplifiedVGFRecognitionClient = class {
6235
6239
  this.isRecordingAudio = false;
6236
6240
  this.state = updateStateOnStop(this.state);
6237
6241
  this.notifyStateChange();
6238
- if (this.state.transcriptionStatus === TranscriptionStatus.NOT_STARTED) {
6242
+ if (this.client.getState() === "connected" /* CONNECTED */ || this.client.getState() === "connecting" /* CONNECTING */) {
6239
6243
  if (this.logger) {
6240
6244
  this.logger(
6241
6245
  "info",