@mastra/voice-google-gemini-live 0.14.16 → 0.14.17-alpha.1
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/_types/@internal_voice/dist/_types/zod/v4/core/schemas.d.ts +3 -1
- package/dist/_types/@internal_voice/dist/_types/zod/v4/core/util.d.ts +2 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/integrations-voice-google.md +6 -0
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -8
|
@@ -834,8 +834,10 @@ export type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Val
|
|
|
834
834
|
export type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key extends $partial ? Partial<Record<core.input<Key> & PropertyKey, core.input<Value>>> : [
|
|
835
835
|
Value
|
|
836
836
|
] extends [OptionalInSchema] ? Partial<Record<core.input<Key> & PropertyKey, core.input<Value>>> : Record<core.input<Key> & PropertyKey, core.input<Value>>;
|
|
837
|
-
export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals
|
|
837
|
+
export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals {
|
|
838
838
|
def: $ZodRecordDef<Key, Value>;
|
|
839
|
+
output: $InferZodRecordOutput<Key, Value>;
|
|
840
|
+
input: $InferZodRecordInput<Key, Value>;
|
|
839
841
|
isst: errors.$ZodIssueInvalidType | errors.$ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
|
|
840
842
|
optin?: "optional" | undefined;
|
|
841
843
|
optout?: "optional" | undefined;
|
|
@@ -221,6 +221,8 @@ export declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIs
|
|
|
221
221
|
export declare function unwrapMessage(message: string | {
|
|
222
222
|
message: string;
|
|
223
223
|
} | undefined | null): string | undefined;
|
|
224
|
+
/** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
|
|
225
|
+
export declare function sizeCaps(defChecks: checks.$ZodCheck<never>[] | undefined): [number, checks.$ZodCheck<never>][];
|
|
224
226
|
export declare function attachSchema(issues: errors.$ZodRawIssue[], start: number, inst: schemas.$ZodType): void;
|
|
225
227
|
export declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;
|
|
226
228
|
export declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-voice-google-gemini-live
|
|
|
3
3
|
description: Documentation for @mastra/voice-google-gemini-live. Use when working with @mastra/voice-google-gemini-live APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/voice-google-gemini-live"
|
|
6
|
-
version: "0.14.
|
|
6
|
+
version: "0.14.17-alpha.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -397,6 +397,12 @@ voice.close()
|
|
|
397
397
|
|
|
398
398
|
**sessionConfig.contextCompression** (`boolean`): Enable automatic context compression.
|
|
399
399
|
|
|
400
|
+
**inputAudioTranscription** (`GeminiAudioTranscriptionConfig`): Transcription settings for the user's speech. Set languageCodes to BCP-47 hints (for example \['es-ES']) so short or accented utterances aren't transcribed in the wrong language. Without hints, the server auto-detects the language. Applied when the session connects.
|
|
401
|
+
|
|
402
|
+
**inputAudioTranscription.languageCodes** (`string[]`): BCP-47 language codes present in the audio.
|
|
403
|
+
|
|
404
|
+
**outputAudioTranscription** (`GeminiAudioTranscriptionConfig`): Transcription settings for the model's speech. Takes the same languageCodes hints as inputAudioTranscription. Applied when the session connects.
|
|
405
|
+
|
|
400
406
|
**debug** (`boolean`): Enable debug logging for troubleshooting. (Default: `false`)
|
|
401
407
|
|
|
402
408
|
### Methods
|
package/dist/index.cjs
CHANGED
|
@@ -2085,6 +2085,11 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
2085
2085
|
return new Promise((resolve, reject) => {
|
|
2086
2086
|
if (config.model) this.log("Warning: Model cannot be changed during an active session. Ignoring model update.");
|
|
2087
2087
|
if (config.vertexAI !== void 0 || config.project !== void 0 || config.location !== void 0) this.log("Warning: Authentication settings cannot be changed during an active session.");
|
|
2088
|
+
if (config.inputAudioTranscription !== void 0 || config.outputAudioTranscription !== void 0) {
|
|
2089
|
+
if (config.inputAudioTranscription !== void 0) this.options.inputAudioTranscription = config.inputAudioTranscription;
|
|
2090
|
+
if (config.outputAudioTranscription !== void 0) this.options.outputAudioTranscription = config.outputAudioTranscription;
|
|
2091
|
+
this.log("Warning: Transcription settings apply at setup time and take effect on the next connect().");
|
|
2092
|
+
}
|
|
2088
2093
|
const updateMessage = {
|
|
2089
2094
|
type: "session.update",
|
|
2090
2095
|
session: {}
|
|
@@ -2798,8 +2803,8 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
2798
2803
|
const setupMessage = { setup: {
|
|
2799
2804
|
model: this.resolveModelIdentifier(),
|
|
2800
2805
|
generation_config: generationConfig,
|
|
2801
|
-
input_audio_transcription:
|
|
2802
|
-
output_audio_transcription:
|
|
2806
|
+
input_audio_transcription: this.toWireTranscriptionConfig(this.options.inputAudioTranscription),
|
|
2807
|
+
output_audio_transcription: this.toWireTranscriptionConfig(this.options.outputAudioTranscription),
|
|
2803
2808
|
realtime_input_config: { activity_handling: "START_OF_ACTIVITY_INTERRUPTS" },
|
|
2804
2809
|
...this.options.sessionConfig?.enableResumption && { session_resumption: this.isResuming && this.sessionHandle ? { handle: this.sessionHandle } : {} },
|
|
2805
2810
|
...this.options.sessionConfig?.initialHistoryInClientContent !== false && { history_config: { initial_history_in_client_content: true } }
|
|
@@ -2819,6 +2824,13 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
2819
2824
|
}
|
|
2820
2825
|
}
|
|
2821
2826
|
/**
|
|
2827
|
+
* Map the public camelCase transcription config to the Live API wire format. Always returns an
|
|
2828
|
+
* object so transcription stays enabled; `language_codes` is only included when set.
|
|
2829
|
+
*/
|
|
2830
|
+
toWireTranscriptionConfig(config) {
|
|
2831
|
+
return config?.languageCodes !== void 0 ? { language_codes: config.languageCodes } : {};
|
|
2832
|
+
}
|
|
2833
|
+
/**
|
|
2822
2834
|
* Wait for Gemini Live session to be created and ready
|
|
2823
2835
|
* @private
|
|
2824
2836
|
*/
|