@effect-uai/google 0.3.0 → 0.5.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/Gemini.d.mts +6 -5
- package/dist/Gemini.d.mts.map +1 -1
- package/dist/Gemini.mjs +42 -22
- package/dist/Gemini.mjs.map +1 -1
- package/dist/GeminiEmbedding.d.mts.map +1 -1
- package/dist/GeminiEmbedding.mjs +2 -2
- package/dist/GeminiEmbedding.mjs.map +1 -1
- package/dist/GeminiSynthesizer.d.mts +38 -0
- package/dist/GeminiSynthesizer.d.mts.map +1 -0
- package/dist/GeminiSynthesizer.mjs +95 -0
- package/dist/GeminiSynthesizer.mjs.map +1 -0
- package/dist/GeminiSynthesizer.test.d.mts +1 -0
- package/dist/GeminiSynthesizer.test.mjs +84 -0
- package/dist/GeminiSynthesizer.test.mjs.map +1 -0
- package/dist/GeminiTranscriber.d.mts +42 -0
- package/dist/GeminiTranscriber.d.mts.map +1 -0
- package/dist/GeminiTranscriber.mjs +80 -0
- package/dist/GeminiTranscriber.mjs.map +1 -0
- package/dist/GeminiTranscriber.test.d.mts +1 -0
- package/dist/GeminiTranscriber.test.mjs +125 -0
- package/dist/GeminiTranscriber.test.mjs.map +1 -0
- package/dist/LyriaGenerator.d.mts +57 -0
- package/dist/LyriaGenerator.d.mts.map +1 -0
- package/dist/LyriaGenerator.mjs +202 -0
- package/dist/LyriaGenerator.mjs.map +1 -0
- package/dist/LyriaGenerator.test.d.mts +1 -0
- package/dist/LyriaGenerator.test.mjs +138 -0
- package/dist/LyriaGenerator.test.mjs.map +1 -0
- package/dist/{chunk-CfYAbeIz.mjs → chunk-uyGKjUfl.mjs} +2 -1
- package/dist/codec.d.mts +51 -6
- package/dist/codec.d.mts.map +1 -1
- package/dist/codec.mjs +151 -27
- package/dist/codec.mjs.map +1 -1
- package/dist/dist-DMsg8YLb.mjs +13782 -0
- package/dist/dist-DMsg8YLb.mjs.map +1 -0
- package/dist/geminiSpeechCodec.d.mts +37 -0
- package/dist/geminiSpeechCodec.d.mts.map +1 -0
- package/dist/geminiSpeechCodec.mjs +110 -0
- package/dist/geminiSpeechCodec.mjs.map +1 -0
- package/dist/geminiSpeechCodec.test.d.mts +1 -0
- package/dist/geminiSpeechCodec.test.mjs +78 -0
- package/dist/geminiSpeechCodec.test.mjs.map +1 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.mjs +4 -1
- package/dist/magic-string.es-CaWgF-3p.mjs +1013 -0
- package/dist/magic-string.es-CaWgF-3p.mjs.map +1 -0
- package/dist/models.d.mts +35 -1
- package/dist/models.d.mts.map +1 -1
- package/package.json +14 -2
- package/src/Gemini.ts +53 -18
- package/src/GeminiEmbedding.ts +23 -5
- package/src/GeminiSynthesizer.test.ts +93 -0
- package/src/GeminiSynthesizer.ts +214 -0
- package/src/GeminiTranscriber.test.ts +136 -0
- package/src/GeminiTranscriber.ts +204 -0
- package/src/LyriaGenerator.test.ts +162 -0
- package/src/LyriaGenerator.ts +390 -0
- package/src/codec.ts +312 -36
- package/src/geminiSpeechCodec.test.ts +56 -0
- package/src/geminiSpeechCodec.ts +137 -0
- package/src/index.ts +3 -0
- package/src/models.ts +84 -0
package/src/models.ts
CHANGED
|
@@ -31,6 +31,90 @@ export type GoogleModel =
|
|
|
31
31
|
*
|
|
32
32
|
* Reference: https://ai.google.dev/gemini-api/docs/embeddings
|
|
33
33
|
*/
|
|
34
|
+
/**
|
|
35
|
+
* Known Gemini TTS model identifiers. `(string & {})` tail keeps
|
|
36
|
+
* autocomplete on the literals while still accepting any string.
|
|
37
|
+
*
|
|
38
|
+
* Reference: https://ai.google.dev/gemini-api/docs/speech-generation
|
|
39
|
+
*/
|
|
40
|
+
export type GeminiTtsModel =
|
|
41
|
+
| "gemini-2.5-flash-preview-tts"
|
|
42
|
+
| "gemini-2.5-pro-preview-tts"
|
|
43
|
+
| "gemini-3.1-flash-tts-preview"
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
45
|
+
| (string & {})
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Known Gemini models that accept audio input via `inlineData` /
|
|
49
|
+
* `fileData` on `generateContent`. Used by `GeminiTranscriber` —
|
|
50
|
+
* transcription is prompt-driven on top of these models, not a
|
|
51
|
+
* dedicated endpoint.
|
|
52
|
+
*
|
|
53
|
+
* Reference: https://ai.google.dev/gemini-api/docs/audio
|
|
54
|
+
*/
|
|
55
|
+
export type GeminiSttModel =
|
|
56
|
+
| "gemini-3-flash-preview"
|
|
57
|
+
| "gemini-3.1-pro-preview"
|
|
58
|
+
| "gemini-3.1-flash-lite-preview"
|
|
59
|
+
| "gemini-2.5-flash"
|
|
60
|
+
| "gemini-2.5-pro"
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
62
|
+
| (string & {})
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 30 prebuilt voice names for Gemini TTS. No custom-voice / cloning path
|
|
66
|
+
* is exposed on this surface, so the tail is stock-only (no
|
|
67
|
+
* `(string & {})` escape).
|
|
68
|
+
*
|
|
69
|
+
* Reference: https://ai.google.dev/gemini-api/docs/speech-generation
|
|
70
|
+
*/
|
|
71
|
+
export type GeminiVoiceName =
|
|
72
|
+
| "Zephyr"
|
|
73
|
+
| "Puck"
|
|
74
|
+
| "Charon"
|
|
75
|
+
| "Kore"
|
|
76
|
+
| "Fenrir"
|
|
77
|
+
| "Leda"
|
|
78
|
+
| "Orus"
|
|
79
|
+
| "Aoede"
|
|
80
|
+
| "Callirrhoe"
|
|
81
|
+
| "Autonoe"
|
|
82
|
+
| "Enceladus"
|
|
83
|
+
| "Iapetus"
|
|
84
|
+
| "Umbriel"
|
|
85
|
+
| "Algieba"
|
|
86
|
+
| "Despina"
|
|
87
|
+
| "Erinome"
|
|
88
|
+
| "Algenib"
|
|
89
|
+
| "Rasalgethi"
|
|
90
|
+
| "Laomedeia"
|
|
91
|
+
| "Achernar"
|
|
92
|
+
| "Alnilam"
|
|
93
|
+
| "Schedar"
|
|
94
|
+
| "Gacrux"
|
|
95
|
+
| "Pulcherrima"
|
|
96
|
+
| "Achird"
|
|
97
|
+
| "Zubenelgenubi"
|
|
98
|
+
| "Vindemiatrix"
|
|
99
|
+
| "Sadachbia"
|
|
100
|
+
| "Sadaltager"
|
|
101
|
+
| "Sulafat"
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Known Lyria (music generation) model identifiers. `(string & {})` tail
|
|
105
|
+
* keeps autocomplete on the literals while still accepting any string.
|
|
106
|
+
*
|
|
107
|
+
* - `lyria-3-clip-preview` — fixed 30s output, MP3 only.
|
|
108
|
+
* - `lyria-3-pro-preview` — up to a couple of minutes, MP3 or WAV.
|
|
109
|
+
*
|
|
110
|
+
* Reference: https://ai.google.dev/gemini-api/docs/music-generation
|
|
111
|
+
*/
|
|
112
|
+
export type LyriaModel =
|
|
113
|
+
| "lyria-3-clip-preview"
|
|
114
|
+
| "lyria-3-pro-preview"
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
116
|
+
| (string & {})
|
|
117
|
+
|
|
34
118
|
export type GoogleEmbeddingModel =
|
|
35
119
|
| "gemini-embedding-2"
|
|
36
120
|
| "gemini-embedding-001"
|