@volley/recognition-client-sdk 0.1.803 → 0.1.806

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.
@@ -1,9 +1,40 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Gemini Model Types
5
+ * Based on available models as of January 2025
6
+ *
7
+ * API Version Notes:
8
+ * - Gemini 2.5+ models: Use v1beta API (early access features)
9
+ * - Gemini 2.0 models: Use v1beta API (early access features)
10
+ * - Gemini 1.5 models: Use v1 API (stable, production-ready)
11
+ *
12
+ * @see https://ai.google.dev/gemini-api/docs/models
13
+ * @see https://ai.google.dev/gemini-api/docs/api-versions
14
+ */
15
+ declare enum GeminiModel {
16
+ GEMINI_2_5_PRO = "gemini-2.5-pro",
17
+ GEMINI_2_5_FLASH = "gemini-2.5-flash",
18
+ GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite",
19
+ GEMINI_2_0_FLASH_LATEST = "gemini-2.0-flash-latest",
20
+ GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"
21
+ }
22
+
23
+ /**
24
+ * OpenAI Batch API Model Types (HTTP API)
25
+ * @see https://platform.openai.com/docs/guides/speech-to-text
26
+ *
27
+ * Note: For openai-realtime provider models, see OpenAIRealtimeModel in provider.types.ts
28
+ */
29
+ declare enum OpenAIModel {
30
+ WHISPER_1 = "whisper-1"
31
+ }
32
+
3
33
  /**
4
34
  * Provider types and enums for recognition services
5
35
  * NOTE_TO_AI: DO NOT CHANGE THIS UNLESS EXPLICITLY ASKED. Always ask before making any changes.
6
36
  */
37
+
7
38
  /**
8
39
  * Supported speech recognition providers
9
40
  */
@@ -45,6 +76,17 @@ declare enum DeepgramModel {
45
76
  NOVA_3 = "nova-3",
46
77
  FLUX_GENERAL_EN = "flux-general-en"
47
78
  }
79
+ /**
80
+ * AssemblyAI streaming speech models
81
+ * @see https://www.assemblyai.com/docs/streaming/universal-streaming
82
+ * @see https://www.assemblyai.com/docs/streaming/universal-3-pro
83
+ */
84
+ declare enum AssemblyAIModel {
85
+ DEFAULT = "default",
86
+ UNIVERSAL_STREAMING_ENGLISH = "universal-streaming-english",
87
+ UNIVERSAL_STREAMING_MULTILINGUAL = "universal-streaming-multilingual",
88
+ U3_RT_PRO = "u3-rt-pro"
89
+ }
48
90
  /**
49
91
  * Google Cloud Speech models
50
92
  * @see https://cloud.google.com/speech-to-text/docs/transcription-model
@@ -169,7 +211,7 @@ declare enum SelfServeVllmModel {
169
211
  /**
170
212
  * Type alias for any model from any provider
171
213
  */
172
- type RecognitionModel = DeepgramModel | GoogleModel | FireworksModel | GladiaModel | ElevenLabsModel | OpenAIRealtimeModel | MistralVoxtralModel | CartesiaModel | DashScopeModel | InworldSttModel | SelfServeVllmModel | BedrockModel | AwsTranscribeModel | AmazonNovaSonicModel | string;
214
+ type RecognitionModel = AssemblyAIModel | DeepgramModel | GoogleModel | FireworksModel | GladiaModel | ElevenLabsModel | OpenAIModel | GeminiModel | OpenAIRealtimeModel | MistralVoxtralModel | CartesiaModel | DashScopeModel | InworldSttModel | SelfServeVllmModel | BedrockModel | AwsTranscribeModel | AmazonNovaSonicModel | string;
173
215
 
174
216
  /**
175
217
  * Recognition Result Types V1
@@ -797,6 +839,26 @@ declare const GameContextSchemaV1: z.ZodObject<{
797
839
  }>;
798
840
  type GameContextV1 = z.infer<typeof GameContextSchemaV1>;
799
841
 
842
+ /**
843
+ * Microphone Source Types
844
+ *
845
+ * Identifies which client-side audio capture path produced the audio.
846
+ * Paired with the upstream client capture enum — the recognition service
847
+ * always stores/uses this enum internally (never the raw wire string).
848
+ *
849
+ * Clients send the value as a string query param; normalize it to the enum
850
+ * at the SDK / server boundary via {@link coerceMicrophoneSourceType}.
851
+ */
852
+ /**
853
+ * Audio capture source path reported by the client.
854
+ */
855
+ declare enum MicrophoneSourceType {
856
+ /** Browser / legacy web capture path (default). */
857
+ WEB = "web",
858
+ /** Mobile native bridge path (MobileNativeSource) when supported. */
859
+ NATIVE = "native"
860
+ }
861
+
800
862
  /**
801
863
  * Unified ASR Request Configuration
802
864
  *
@@ -1327,6 +1389,14 @@ interface IRecognitionClientConfig {
1327
1389
  accountId?: string;
1328
1390
  /** Question answer identifier for tracking Q&A sessions (optional and tracking purpose only) */
1329
1391
  questionAnswerId?: string;
1392
+ /** Client identifier for downstream tracking/audio-labeling (optional and tracking purpose only) */
1393
+ clientId?: string;
1394
+ /**
1395
+ * Client audio capture path (optional). Accepts the {@link MicrophoneSourceType}
1396
+ * enum or its string value ('web' | 'native'). Defaults to 'web' on the server
1397
+ * when omitted. The service normalizes this to the enum at the boundary.
1398
+ */
1399
+ microphoneSourceType?: MicrophoneSourceType | string;
1330
1400
  /** Platform for audio recording device (optional, e.g., 'ios', 'android', 'web', 'unity') */
1331
1401
  platform?: string;
1332
1402
  /** Experiment cohort (optional). Defaults to 'control' if not provided. */
@@ -4,7 +4,7 @@
4
4
  * Simple builder pattern for RealTimeTwoWayWebSocketRecognitionClientConfig
5
5
  */
6
6
  import type { RealTimeTwoWayWebSocketRecognitionClientConfig, RecognitionCallbackUrl } from './recognition-client.types.js';
7
- import type { ASRRequestConfig, GameContextV1, TranscriptionResultV1, MetadataResultV1, SessionConfiguredV1, AudioMetricsResultV1, ErrorResultV1, Stage } from '@recog/shared-types';
7
+ import type { ASRRequestConfig, GameContextV1, TranscriptionResultV1, MetadataResultV1, SessionConfiguredV1, AudioMetricsResultV1, ErrorResultV1, Stage, MicrophoneSourceType } from '@recog/shared-types';
8
8
  /**
9
9
  * Builder for RealTimeTwoWayWebSocketRecognitionClientConfig
10
10
  *
@@ -82,6 +82,15 @@ export declare class ConfigBuilder {
82
82
  * Set question answer ID
83
83
  */
84
84
  questionAnswerId(id: string): this;
85
+ /**
86
+ * Set client ID (for downstream tracking/audio-labeling)
87
+ */
88
+ clientId(id: string): this;
89
+ /**
90
+ * Set the client audio capture path (MicrophoneSourceType enum or 'web' | 'native' string).
91
+ * Defaults to 'web' on the server when omitted.
92
+ */
93
+ microphoneSourceType(source: MicrophoneSourceType | string): this;
85
94
  /**
86
95
  * Set platform
87
96
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config-builder.d.ts","sourceRoot":"","sources":["../src/config-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,8CAA8C,EAC9C,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,KAAK,EACN,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAA+D;IAE7E;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKtB;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAKhD;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAKzC;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxB;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI;IAKlD;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxB;;OAEG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAK/B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAK1B;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAK3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,MA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ACH,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK3C;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKrC;;OAEG;IAEH,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IAKvG;;OAEG;IACH,KAAK,IAAI,8CAA8C;CAGxD"}
@@ -1,9 +1,40 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Gemini Model Types
5
+ * Based on available models as of January 2025
6
+ *
7
+ * API Version Notes:
8
+ * - Gemini 2.5+ models: Use v1beta API (early access features)
9
+ * - Gemini 2.0 models: Use v1beta API (early access features)
10
+ * - Gemini 1.5 models: Use v1 API (stable, production-ready)
11
+ *
12
+ * @see https://ai.google.dev/gemini-api/docs/models
13
+ * @see https://ai.google.dev/gemini-api/docs/api-versions
14
+ */
15
+ declare enum GeminiModel {
16
+ GEMINI_2_5_PRO = "gemini-2.5-pro",
17
+ GEMINI_2_5_FLASH = "gemini-2.5-flash",
18
+ GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite",
19
+ GEMINI_2_0_FLASH_LATEST = "gemini-2.0-flash-latest",
20
+ GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"
21
+ }
22
+
23
+ /**
24
+ * OpenAI Batch API Model Types (HTTP API)
25
+ * @see https://platform.openai.com/docs/guides/speech-to-text
26
+ *
27
+ * Note: For openai-realtime provider models, see OpenAIRealtimeModel in provider.types.ts
28
+ */
29
+ declare enum OpenAIModel {
30
+ WHISPER_1 = "whisper-1"
31
+ }
32
+
3
33
  /**
4
34
  * Provider types and enums for recognition services
5
35
  * NOTE_TO_AI: DO NOT CHANGE THIS UNLESS EXPLICITLY ASKED. Always ask before making any changes.
6
36
  */
37
+
7
38
  /**
8
39
  * Supported speech recognition providers
9
40
  */
@@ -45,6 +76,17 @@ declare enum DeepgramModel {
45
76
  NOVA_3 = "nova-3",
46
77
  FLUX_GENERAL_EN = "flux-general-en"
47
78
  }
79
+ /**
80
+ * AssemblyAI streaming speech models
81
+ * @see https://www.assemblyai.com/docs/streaming/universal-streaming
82
+ * @see https://www.assemblyai.com/docs/streaming/universal-3-pro
83
+ */
84
+ declare enum AssemblyAIModel {
85
+ DEFAULT = "default",
86
+ UNIVERSAL_STREAMING_ENGLISH = "universal-streaming-english",
87
+ UNIVERSAL_STREAMING_MULTILINGUAL = "universal-streaming-multilingual",
88
+ U3_RT_PRO = "u3-rt-pro"
89
+ }
48
90
  /**
49
91
  * Google Cloud Speech models
50
92
  * @see https://cloud.google.com/speech-to-text/docs/transcription-model
@@ -169,7 +211,7 @@ declare enum SelfServeVllmModel {
169
211
  /**
170
212
  * Type alias for any model from any provider
171
213
  */
172
- type RecognitionModel = DeepgramModel | GoogleModel | FireworksModel | GladiaModel | ElevenLabsModel | OpenAIRealtimeModel | MistralVoxtralModel | CartesiaModel | DashScopeModel | InworldSttModel | SelfServeVllmModel | BedrockModel | AwsTranscribeModel | AmazonNovaSonicModel | string;
214
+ type RecognitionModel = AssemblyAIModel | DeepgramModel | GoogleModel | FireworksModel | GladiaModel | ElevenLabsModel | OpenAIModel | GeminiModel | OpenAIRealtimeModel | MistralVoxtralModel | CartesiaModel | DashScopeModel | InworldSttModel | SelfServeVllmModel | BedrockModel | AwsTranscribeModel | AmazonNovaSonicModel | string;
173
215
 
174
216
  /**
175
217
  * Recognition Result Types V1
@@ -1527,6 +1569,26 @@ declare const ASRRequestSchemaV1: z.ZodObject<{
1527
1569
  }>;
1528
1570
  type ASRRequestV1 = z.infer<typeof ASRRequestSchemaV1>;
1529
1571
 
1572
+ /**
1573
+ * Microphone Source Types
1574
+ *
1575
+ * Identifies which client-side audio capture path produced the audio.
1576
+ * Paired with the upstream client capture enum — the recognition service
1577
+ * always stores/uses this enum internally (never the raw wire string).
1578
+ *
1579
+ * Clients send the value as a string query param; normalize it to the enum
1580
+ * at the SDK / server boundary via {@link coerceMicrophoneSourceType}.
1581
+ */
1582
+ /**
1583
+ * Audio capture source path reported by the client.
1584
+ */
1585
+ declare enum MicrophoneSourceType {
1586
+ /** Browser / legacy web capture path (default). */
1587
+ WEB = "web",
1588
+ /** Mobile native bridge path (MobileNativeSource) when supported. */
1589
+ NATIVE = "native"
1590
+ }
1591
+
1530
1592
  /**
1531
1593
  * Unified ASR Request Configuration
1532
1594
  *
@@ -1811,36 +1873,6 @@ type PartialASRRequestConfig = Partial<ASRRequestConfig>;
1811
1873
  */
1812
1874
  declare function createDefaultASRConfig(overrides?: PartialASRRequestConfig): ASRRequestConfig;
1813
1875
 
1814
- /**
1815
- * Gemini Model Types
1816
- * Based on available models as of January 2025
1817
- *
1818
- * API Version Notes:
1819
- * - Gemini 2.5+ models: Use v1beta API (early access features)
1820
- * - Gemini 2.0 models: Use v1beta API (early access features)
1821
- * - Gemini 1.5 models: Use v1 API (stable, production-ready)
1822
- *
1823
- * @see https://ai.google.dev/gemini-api/docs/models
1824
- * @see https://ai.google.dev/gemini-api/docs/api-versions
1825
- */
1826
- declare enum GeminiModel {
1827
- GEMINI_2_5_PRO = "gemini-2.5-pro",
1828
- GEMINI_2_5_FLASH = "gemini-2.5-flash",
1829
- GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite",
1830
- GEMINI_2_0_FLASH_LATEST = "gemini-2.0-flash-latest",
1831
- GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"
1832
- }
1833
-
1834
- /**
1835
- * OpenAI Batch API Model Types (HTTP API)
1836
- * @see https://platform.openai.com/docs/guides/speech-to-text
1837
- *
1838
- * Note: For openai-realtime provider models, see OpenAIRealtimeModel in provider.types.ts
1839
- */
1840
- declare enum OpenAIModel {
1841
- WHISPER_1 = "whisper-1"
1842
- }
1843
-
1844
1876
  /**
1845
1877
  * Standard stage/environment constants used across all services
1846
1878
  */
@@ -2096,6 +2128,14 @@ interface IRecognitionClientConfig {
2096
2128
  accountId?: string;
2097
2129
  /** Question answer identifier for tracking Q&A sessions (optional and tracking purpose only) */
2098
2130
  questionAnswerId?: string;
2131
+ /** Client identifier for downstream tracking/audio-labeling (optional and tracking purpose only) */
2132
+ clientId?: string;
2133
+ /**
2134
+ * Client audio capture path (optional). Accepts the {@link MicrophoneSourceType}
2135
+ * enum or its string value ('web' | 'native'). Defaults to 'web' on the server
2136
+ * when omitted. The service normalizes this to the enum at the boundary.
2137
+ */
2138
+ microphoneSourceType?: MicrophoneSourceType | string;
2099
2139
  /** Platform for audio recording device (optional, e.g., 'ios', 'android', 'web', 'unity') */
2100
2140
  platform?: string;
2101
2141
  /** Experiment cohort (optional). Defaults to 'control' if not provided. */
@@ -2596,6 +2636,15 @@ declare class ConfigBuilder {
2596
2636
  * Set question answer ID
2597
2637
  */
2598
2638
  questionAnswerId(id: string): this;
2639
+ /**
2640
+ * Set client ID (for downstream tracking/audio-labeling)
2641
+ */
2642
+ clientId(id: string): this;
2643
+ /**
2644
+ * Set the client audio capture path (MicrophoneSourceType enum or 'web' | 'native' string).
2645
+ * Defaults to 'web' on the server when omitted.
2646
+ */
2647
+ microphoneSourceType(source: MicrophoneSourceType | string): this;
2599
2648
  /**
2600
2649
  * Set platform
2601
2650
  */
@@ -3024,6 +3073,40 @@ declare class SimplifiedVGFRecognitionClient implements ISimplifiedVGFRecognitio
3024
3073
  getVGFState(): RecognitionState;
3025
3074
  private notifyStateChange;
3026
3075
  }
3076
+ /**
3077
+ * Fluent builder for {@link SimplifiedVGFClientConfig}.
3078
+ *
3079
+ * Extends {@link ConfigBuilder} with the two VGF-specific fields
3080
+ * (`onStateChange`, `initialState`) so the simplified client has the same
3081
+ * builder ergonomics as the base RealTimeTwoWayWebSocketRecognitionClient.
3082
+ *
3083
+ * Example:
3084
+ * ```typescript
3085
+ * import { STAGES, RecognitionProvider } from '@recog/shared-types';
3086
+ *
3087
+ * const config = new SimplifiedVGFConfigBuilder()
3088
+ * .stage(STAGES.STAGING)
3089
+ * .asrRequestConfig({ provider: RecognitionProvider.DEEPGRAM, language: 'en' })
3090
+ * .onStateChange((state) => setVGFState(state))
3091
+ * .build();
3092
+ * ```
3093
+ */
3094
+ declare class SimplifiedVGFConfigBuilder extends ConfigBuilder {
3095
+ private vgfConfig;
3096
+ /**
3097
+ * Set the VGF state-change callback, fired whenever the VGF state updates.
3098
+ */
3099
+ onStateChange(callback: (state: RecognitionState) => void): this;
3100
+ /**
3101
+ * Set the initial VGF state to restore from a previous session.
3102
+ * The audioUtteranceId is extracted from it when valid.
3103
+ */
3104
+ initialState(state: RecognitionState): this;
3105
+ /**
3106
+ * Build the SimplifiedVGFClientConfig (base fields + VGF fields).
3107
+ */
3108
+ build(): SimplifiedVGFClientConfig;
3109
+ }
3027
3110
  /**
3028
3111
  * Factory function for creating simplified client
3029
3112
  * Usage examples:
@@ -3068,6 +3151,24 @@ declare class SimplifiedVGFRecognitionClient implements ISimplifiedVGFRecognitio
3068
3151
  * // VGF state automatically updates based on transcription results
3069
3152
  */
3070
3153
  declare function createSimplifiedVGFClient(config: SimplifiedVGFClientConfig): ISimplifiedVGFRecognitionClient;
3154
+ /**
3155
+ * Create a simplified VGF client using the builder pattern.
3156
+ *
3157
+ * Mirror of `createClientWithBuilder` for the base client.
3158
+ *
3159
+ * Example:
3160
+ * ```typescript
3161
+ * import { STAGES, RecognitionProvider } from '@recog/shared-types';
3162
+ *
3163
+ * const client = createSimplifiedVGFClientWithBuilder((builder) =>
3164
+ * builder
3165
+ * .stage(STAGES.STAGING)
3166
+ * .asrRequestConfig({ provider: RecognitionProvider.DEEPGRAM, language: 'en' })
3167
+ * .onStateChange((state) => setVGFState(state))
3168
+ * );
3169
+ * ```
3170
+ */
3171
+ declare function createSimplifiedVGFClientWithBuilder(configure: (builder: SimplifiedVGFConfigBuilder) => SimplifiedVGFConfigBuilder): ISimplifiedVGFRecognitionClient;
3071
3172
 
3072
3173
  /**
3073
3174
  * VGF Recognition Mapper
@@ -3134,5 +3235,5 @@ declare function getRecognitionConductorHttpBase(stage?: Stage | string | null |
3134
3235
  declare function getRecognitionConductorWsBase(stage?: Stage | string | null | undefined): string;
3135
3236
  declare function getRecognitionConductorHost(stage?: Stage | string | null | undefined): string;
3136
3237
 
3137
- export { AmazonNovaSonicModel, AudioEncoding, AwsTranscribeModel, BedrockModel, CartesiaModel, ClientControlActionV1, ClientState, ConfigBuilder, ConnectionError, ControlSignalTypeV1 as ControlSignal, ControlSignalTypeV1, DashScopeModel, DeepgramModel, ElevenLabsModel, ErrorTypeV1, FinalTranscriptStability, FireworksModel, GeminiModel, GladiaModel, GoogleModel, Language, MistralVoxtralModel, OpenAIModel, OpenAIRealtimeModel, RECOGNITION_CONDUCTOR_BASES, RECOGNITION_SERVICE_BASES, RealTimeTwoWayWebSocketRecognitionClient, RecognitionContextTypeV1, RecognitionError, RecognitionProvider, RecognitionResultTypeV1, RecognitionVGFStateSchema, RecordingStatus, STAGES, SampleRate, SelfServeVllmModel, SimplifiedVGFRecognitionClient, TimeoutError, TranscriptionStatus, ValidationError, createClient, createClientWithBuilder, createDefaultASRConfig, createInitialRecognitionState, createSimplifiedVGFClient, getRecognitionConductorBase, getRecognitionConductorHost, getRecognitionConductorHttpBase, getRecognitionConductorWsBase, getRecognitionServiceBase, getRecognitionServiceHost, getRecognitionServiceHttpBase, getRecognitionServiceWsBase, getUserFriendlyMessage, isExceptionImmediatelyAvailable, isNormalDisconnection, isTerminal, isValidRecordingStatusTransition, normalizeStage, resetRecognitionVGFState };
3238
+ export { AmazonNovaSonicModel, AssemblyAIModel, AudioEncoding, AwsTranscribeModel, BedrockModel, CartesiaModel, ClientControlActionV1, ClientState, ConfigBuilder, ConnectionError, ControlSignalTypeV1 as ControlSignal, ControlSignalTypeV1, DashScopeModel, DeepgramModel, ElevenLabsModel, ErrorTypeV1, FinalTranscriptStability, FireworksModel, GeminiModel, GladiaModel, GoogleModel, Language, MicrophoneSourceType, MistralVoxtralModel, OpenAIModel, OpenAIRealtimeModel, RECOGNITION_CONDUCTOR_BASES, RECOGNITION_SERVICE_BASES, RealTimeTwoWayWebSocketRecognitionClient, RecognitionContextTypeV1, RecognitionError, RecognitionProvider, RecognitionResultTypeV1, RecognitionVGFStateSchema, RecordingStatus, STAGES, SampleRate, SelfServeVllmModel, SimplifiedVGFConfigBuilder, SimplifiedVGFRecognitionClient, TimeoutError, TranscriptionStatus, ValidationError, createClient, createClientWithBuilder, createDefaultASRConfig, createInitialRecognitionState, createSimplifiedVGFClient, createSimplifiedVGFClientWithBuilder, getRecognitionConductorBase, getRecognitionConductorHost, getRecognitionConductorHttpBase, getRecognitionConductorWsBase, getRecognitionServiceBase, getRecognitionServiceHost, getRecognitionServiceHttpBase, getRecognitionServiceWsBase, getUserFriendlyMessage, isExceptionImmediatelyAvailable, isNormalDisconnection, isTerminal, isValidRecordingStatusTransition, normalizeStage, resetRecognitionVGFState };
3138
3239
  export type { ASRRequestConfig, ASRRequestV1, AudioMetricsResultV1, AuthenticationException, ConnectionException, ErrorResultV1, FunctionCallResultV1, GameContextV1, IRecognitionClient, IRecognitionClientConfig, IRecognitionClientStats, ISimplifiedVGFRecognitionClient, MetadataResultV1, ProviderException, QuotaExceededException, RealTimeTwoWayWebSocketRecognitionClientConfig, RecognitionCallbackUrl, RecognitionException, RecognitionState, RecordingStatusType, SimplifiedVGFClientConfig, SlotMap, Stage, TimeoutException, TranscriptionResult, TranscriptionResultV1, TranscriptionStatusType, UnknownException, ValidationException };
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ export { RecognitionError, ConnectionError, TimeoutError, ValidationError } from
6
6
  export { ErrorTypeV1 } from '@recog/shared-types';
7
7
  export type { RecognitionException, ConnectionException, TimeoutException, ValidationException, AuthenticationException, ProviderException, QuotaExceededException, UnknownException } from '@recog/shared-types';
8
8
  export { isExceptionImmediatelyAvailable, getUserFriendlyMessage } from '@recog/shared-types';
9
- export { SimplifiedVGFRecognitionClient, createSimplifiedVGFClient, type ISimplifiedVGFRecognitionClient, type SimplifiedVGFClientConfig } from './simplified-vgf-recognition-client.js';
9
+ export { SimplifiedVGFRecognitionClient, SimplifiedVGFConfigBuilder, createSimplifiedVGFClient, createSimplifiedVGFClientWithBuilder, type ISimplifiedVGFRecognitionClient, type SimplifiedVGFClientConfig } from './simplified-vgf-recognition-client.js';
10
10
  export { type RecognitionState, RecognitionVGFStateSchema, RecordingStatus, TranscriptionStatus, type RecordingStatusType, type TranscriptionStatusType, createInitialRecognitionState, isTerminal, isValidRecordingStatusTransition } from './vgf-recognition-state.js';
11
11
  export { resetRecognitionVGFState } from './vgf-recognition-mapper.js';
12
12
  export { AudioEncoding } from '@recog/websocket';
13
13
  export { type GameContextV1, type SlotMap, RecognitionContextTypeV1, ControlSignalTypeV1, ControlSignalTypeV1 as ControlSignal, // Alias for backward compatibility
14
- type TranscriptionResultV1, type FunctionCallResultV1, type MetadataResultV1, type AudioMetricsResultV1, type ErrorResultV1, RecognitionResultTypeV1, ClientControlActionV1, type ASRRequestConfig, type ASRRequestV1, FinalTranscriptStability, createDefaultASRConfig, RecognitionProvider, DeepgramModel, ElevenLabsModel, FireworksModel, GladiaModel, GoogleModel, GeminiModel, OpenAIModel, SelfServeVllmModel, OpenAIRealtimeModel, MistralVoxtralModel, CartesiaModel, DashScopeModel, BedrockModel, AwsTranscribeModel, AmazonNovaSonicModel, Language, SampleRate, STAGES, type Stage } from '@recog/shared-types';
14
+ type TranscriptionResultV1, type FunctionCallResultV1, type MetadataResultV1, type AudioMetricsResultV1, type ErrorResultV1, RecognitionResultTypeV1, ClientControlActionV1, type ASRRequestConfig, type ASRRequestV1, FinalTranscriptStability, createDefaultASRConfig, RecognitionProvider, AssemblyAIModel, DeepgramModel, ElevenLabsModel, FireworksModel, GladiaModel, GoogleModel, GeminiModel, OpenAIModel, SelfServeVllmModel, OpenAIRealtimeModel, MistralVoxtralModel, CartesiaModel, DashScopeModel, BedrockModel, AwsTranscribeModel, AmazonNovaSonicModel, Language, SampleRate, MicrophoneSourceType, STAGES, type Stage } from '@recog/shared-types';
15
15
  export { getRecognitionServiceBase, getRecognitionServiceHttpBase, getRecognitionServiceWsBase, getRecognitionServiceHost, getRecognitionConductorBase, getRecognitionConductorHttpBase, getRecognitionConductorWsBase, getRecognitionConductorHost, normalizeStage, RECOGNITION_SERVICE_BASES, RECOGNITION_CONDUCTOR_BASES } from '@recog/shared-config';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wCAAwC,EACxC,KAAK,8CAA8C,EACnD,KAAK,mBAAmB,EACxB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,WAAW,EACZ,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGrE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EAChB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC/B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,KAAK,gBAAgB,E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,EACzB,KAAK,aAAa,EAClB,uBAAuB,EACvB,qBAAqB,EAGrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,EACR,UAAU,EAGV,oBAAoB,EAGpB,MAAM,EACN,KAAK,KAAK,EACX,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,6BAA6B,EAC7B,2BAA2B,EAC3B,cAAc,EACd,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -3769,6 +3769,13 @@ var DeepgramModel;
3769
3769
  DeepgramModel2["NOVA_3"] = "nova-3";
3770
3770
  DeepgramModel2["FLUX_GENERAL_EN"] = "flux-general-en";
3771
3771
  })(DeepgramModel || (DeepgramModel = {}));
3772
+ var AssemblyAIModel;
3773
+ (function(AssemblyAIModel2) {
3774
+ AssemblyAIModel2["DEFAULT"] = "default";
3775
+ AssemblyAIModel2["UNIVERSAL_STREAMING_ENGLISH"] = "universal-streaming-english";
3776
+ AssemblyAIModel2["UNIVERSAL_STREAMING_MULTILINGUAL"] = "universal-streaming-multilingual";
3777
+ AssemblyAIModel2["U3_RT_PRO"] = "u3-rt-pro";
3778
+ })(AssemblyAIModel || (AssemblyAIModel = {}));
3772
3779
  var GoogleModel;
3773
3780
  (function(GoogleModel2) {
3774
3781
  GoogleModel2["CHIRP_3"] = "chirp_3";
@@ -4499,12 +4506,26 @@ var RecognitionContextSchemaV1 = z.discriminatedUnion("type", [
4499
4506
  ASRRequestSchemaV1
4500
4507
  ]);
4501
4508
 
4509
+ // ../../libs/types/dist/microphone-source.types.js
4510
+ var MicrophoneSourceType;
4511
+ (function(MicrophoneSourceType2) {
4512
+ MicrophoneSourceType2["WEB"] = "web";
4513
+ MicrophoneSourceType2["NATIVE"] = "native";
4514
+ })(MicrophoneSourceType || (MicrophoneSourceType = {}));
4515
+ var DEFAULT_MICROPHONE_SOURCE_TYPE = MicrophoneSourceType.WEB;
4516
+ var NAME_TO_ENUM = {
4517
+ web: MicrophoneSourceType.WEB,
4518
+ native: MicrophoneSourceType.NATIVE
4519
+ };
4520
+
4502
4521
  // ../../libs/types/dist/recognition-query.types.js
4503
4522
  var RecognitionGameInfoSchema = z.object({
4504
4523
  userId: z.string().optional(),
4505
4524
  gameSessionId: z.string().optional(),
4506
4525
  deviceId: z.string().optional(),
4507
4526
  accountId: z.string().optional(),
4527
+ clientId: z.string().optional(),
4528
+ microphoneSourceType: z.nativeEnum(MicrophoneSourceType).optional(),
4508
4529
  gameId: z.string().optional(),
4509
4530
  gamePhase: z.string().optional(),
4510
4531
  questionAskedId: z.string().optional(),
@@ -4545,7 +4566,7 @@ var AudioFormat;
4545
4566
  [5, AudioFormat2.OPUS],
4546
4567
  [6, AudioFormat2.PCM]
4547
4568
  ]);
4548
- const NAME_TO_ENUM = /* @__PURE__ */ new Map([
4569
+ const NAME_TO_ENUM2 = /* @__PURE__ */ new Map([
4549
4570
  ["WAV", AudioFormat2.WAV],
4550
4571
  ["MP3", AudioFormat2.MP3],
4551
4572
  ["FLAC", AudioFormat2.FLAC],
@@ -4566,7 +4587,7 @@ var AudioFormat;
4566
4587
  }
4567
4588
  AudioFormat2.fromId = fromId;
4568
4589
  function fromName(nameStr) {
4569
- return NAME_TO_ENUM.get(nameStr.toUpperCase());
4590
+ return NAME_TO_ENUM2.get(nameStr.toUpperCase());
4570
4591
  }
4571
4592
  AudioFormat2.fromName = fromName;
4572
4593
  function toId(format) {
@@ -4582,7 +4603,7 @@ var AudioFormat;
4582
4603
  }
4583
4604
  AudioFormat2.isIdValid = isIdValid;
4584
4605
  function isNameValid(nameStr) {
4585
- return NAME_TO_ENUM.has(nameStr.toUpperCase());
4606
+ return NAME_TO_ENUM2.has(nameStr.toUpperCase());
4586
4607
  }
4587
4608
  AudioFormat2.isNameValid = isNameValid;
4588
4609
  })(AudioFormat || (AudioFormat = {}));
@@ -4604,7 +4625,7 @@ var AudioEncoding;
4604
4625
  [4, AudioEncoding2.MULAW],
4605
4626
  [5, AudioEncoding2.ALAW]
4606
4627
  ]);
4607
- const NAME_TO_ENUM = /* @__PURE__ */ new Map([
4628
+ const NAME_TO_ENUM2 = /* @__PURE__ */ new Map([
4608
4629
  ["ENCODING_UNSPECIFIED", AudioEncoding2.ENCODING_UNSPECIFIED],
4609
4630
  ["LINEAR16", AudioEncoding2.LINEAR16],
4610
4631
  ["OGG_OPUS", AudioEncoding2.OGG_OPUS],
@@ -4625,7 +4646,7 @@ var AudioEncoding;
4625
4646
  }
4626
4647
  AudioEncoding2.fromId = fromId;
4627
4648
  function fromName(nameStr) {
4628
- return NAME_TO_ENUM.get(nameStr.toUpperCase());
4649
+ return NAME_TO_ENUM2.get(nameStr.toUpperCase());
4629
4650
  }
4630
4651
  AudioEncoding2.fromName = fromName;
4631
4652
  function toId(encoding) {
@@ -4641,7 +4662,7 @@ var AudioEncoding;
4641
4662
  }
4642
4663
  AudioEncoding2.isIdValid = isIdValid;
4643
4664
  function isNameValid(nameStr) {
4644
- return NAME_TO_ENUM.has(nameStr.toUpperCase());
4665
+ return NAME_TO_ENUM2.has(nameStr.toUpperCase());
4645
4666
  }
4646
4667
  AudioEncoding2.isNameValid = isNameValid;
4647
4668
  function coerce2(value, onStringInput) {
@@ -4681,7 +4702,7 @@ var SampleRate;
4681
4702
  [44100, SampleRate2.RATE_44100],
4682
4703
  [48e3, SampleRate2.RATE_48000]
4683
4704
  ]);
4684
- const NAME_TO_ENUM = /* @__PURE__ */ new Map([
4705
+ const NAME_TO_ENUM2 = /* @__PURE__ */ new Map([
4685
4706
  ["RATE_8000", SampleRate2.RATE_8000],
4686
4707
  ["RATE_16000", SampleRate2.RATE_16000],
4687
4708
  ["RATE_22050", SampleRate2.RATE_22050],
@@ -4704,7 +4725,7 @@ var SampleRate;
4704
4725
  }
4705
4726
  SampleRate2.fromHz = fromHz;
4706
4727
  function fromName(nameStr) {
4707
- return NAME_TO_ENUM.get(nameStr.toUpperCase());
4728
+ return NAME_TO_ENUM2.get(nameStr.toUpperCase());
4708
4729
  }
4709
4730
  SampleRate2.fromName = fromName;
4710
4731
  function toHz(rate) {
@@ -4720,7 +4741,7 @@ var SampleRate;
4720
4741
  }
4721
4742
  SampleRate2.isHzValid = isHzValid;
4722
4743
  function isNameValid(nameStr) {
4723
- return NAME_TO_ENUM.has(nameStr.toUpperCase());
4744
+ return NAME_TO_ENUM2.has(nameStr.toUpperCase());
4724
4745
  }
4725
4746
  SampleRate2.isNameValid = isNameValid;
4726
4747
  })(SampleRate || (SampleRate = {}));
@@ -5190,6 +5211,12 @@ function buildWebSocketUrl(config) {
5190
5211
  if (config.questionAnswerId) {
5191
5212
  url.searchParams.set("questionAnswerId", config.questionAnswerId);
5192
5213
  }
5214
+ if (config.clientId) {
5215
+ url.searchParams.set("clientId", config.clientId);
5216
+ }
5217
+ if (config.microphoneSourceType) {
5218
+ url.searchParams.set("microphoneSourceType", config.microphoneSourceType);
5219
+ }
5193
5220
  if (config.platform) {
5194
5221
  url.searchParams.set("platform", config.platform);
5195
5222
  }
@@ -5535,6 +5562,8 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
5535
5562
  ...config.deviceId && { deviceId: config.deviceId },
5536
5563
  ...config.accountId && { accountId: config.accountId },
5537
5564
  ...config.questionAnswerId && { questionAnswerId: config.questionAnswerId },
5565
+ ...config.clientId && { clientId: config.clientId },
5566
+ ...config.microphoneSourceType && { microphoneSourceType: config.microphoneSourceType },
5538
5567
  ...config.platform && { platform: config.platform },
5539
5568
  ...config.gameContext && { gameContext: config.gameContext },
5540
5569
  ...config.gameId && { gameId: config.gameId },
@@ -6292,6 +6321,21 @@ var ConfigBuilder = class {
6292
6321
  this.config.questionAnswerId = id;
6293
6322
  return this;
6294
6323
  }
6324
+ /**
6325
+ * Set client ID (for downstream tracking/audio-labeling)
6326
+ */
6327
+ clientId(id) {
6328
+ this.config.clientId = id;
6329
+ return this;
6330
+ }
6331
+ /**
6332
+ * Set the client audio capture path (MicrophoneSourceType enum or 'web' | 'native' string).
6333
+ * Defaults to 'web' on the server when omitted.
6334
+ */
6335
+ microphoneSourceType(source) {
6336
+ this.config.microphoneSourceType = source;
6337
+ return this;
6338
+ }
6295
6339
  /**
6296
6340
  * Set platform
6297
6341
  */
@@ -6923,11 +6967,44 @@ var SimplifiedVGFRecognitionClient = class {
6923
6967
  this.stateChangeCallback({ ...this.state });
6924
6968
  }
6925
6969
  };
6970
+ var SimplifiedVGFConfigBuilder = class extends ConfigBuilder {
6971
+ constructor() {
6972
+ super(...arguments);
6973
+ this.vgfConfig = {};
6974
+ }
6975
+ /**
6976
+ * Set the VGF state-change callback, fired whenever the VGF state updates.
6977
+ */
6978
+ onStateChange(callback) {
6979
+ this.vgfConfig.onStateChange = callback;
6980
+ return this;
6981
+ }
6982
+ /**
6983
+ * Set the initial VGF state to restore from a previous session.
6984
+ * The audioUtteranceId is extracted from it when valid.
6985
+ */
6986
+ initialState(state) {
6987
+ this.vgfConfig.initialState = state;
6988
+ return this;
6989
+ }
6990
+ /**
6991
+ * Build the SimplifiedVGFClientConfig (base fields + VGF fields).
6992
+ */
6993
+ build() {
6994
+ return { ...super.build(), ...this.vgfConfig };
6995
+ }
6996
+ };
6926
6997
  function createSimplifiedVGFClient(config) {
6927
6998
  return new SimplifiedVGFRecognitionClient(config);
6928
6999
  }
7000
+ function createSimplifiedVGFClientWithBuilder(configure) {
7001
+ const builder = new SimplifiedVGFConfigBuilder();
7002
+ const config = configure(builder).build();
7003
+ return new SimplifiedVGFRecognitionClient(config);
7004
+ }
6929
7005
  export {
6930
7006
  AmazonNovaSonicModel,
7007
+ AssemblyAIModel,
6931
7008
  AudioEncoding,
6932
7009
  AwsTranscribeModel,
6933
7010
  BedrockModel,
@@ -6948,6 +7025,7 @@ export {
6948
7025
  GladiaModel,
6949
7026
  GoogleModel,
6950
7027
  Language,
7028
+ MicrophoneSourceType,
6951
7029
  MistralVoxtralModel,
6952
7030
  OpenAIModel,
6953
7031
  OpenAIRealtimeModel,
@@ -6963,6 +7041,7 @@ export {
6963
7041
  STAGES,
6964
7042
  SampleRate,
6965
7043
  SelfServeVllmModel,
7044
+ SimplifiedVGFConfigBuilder,
6966
7045
  SimplifiedVGFRecognitionClient,
6967
7046
  TimeoutError,
6968
7047
  TranscriptionStatus,
@@ -6972,6 +7051,7 @@ export {
6972
7051
  createDefaultASRConfig,
6973
7052
  createInitialRecognitionState,
6974
7053
  createSimplifiedVGFClient,
7054
+ createSimplifiedVGFClientWithBuilder,
6975
7055
  getRecognitionConductorBase,
6976
7056
  getRecognitionConductorHost,
6977
7057
  getRecognitionConductorHttpBase,