@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.
Files changed (62) hide show
  1. package/dist/Gemini.d.mts +6 -5
  2. package/dist/Gemini.d.mts.map +1 -1
  3. package/dist/Gemini.mjs +42 -22
  4. package/dist/Gemini.mjs.map +1 -1
  5. package/dist/GeminiEmbedding.d.mts.map +1 -1
  6. package/dist/GeminiEmbedding.mjs +2 -2
  7. package/dist/GeminiEmbedding.mjs.map +1 -1
  8. package/dist/GeminiSynthesizer.d.mts +38 -0
  9. package/dist/GeminiSynthesizer.d.mts.map +1 -0
  10. package/dist/GeminiSynthesizer.mjs +95 -0
  11. package/dist/GeminiSynthesizer.mjs.map +1 -0
  12. package/dist/GeminiSynthesizer.test.d.mts +1 -0
  13. package/dist/GeminiSynthesizer.test.mjs +84 -0
  14. package/dist/GeminiSynthesizer.test.mjs.map +1 -0
  15. package/dist/GeminiTranscriber.d.mts +42 -0
  16. package/dist/GeminiTranscriber.d.mts.map +1 -0
  17. package/dist/GeminiTranscriber.mjs +80 -0
  18. package/dist/GeminiTranscriber.mjs.map +1 -0
  19. package/dist/GeminiTranscriber.test.d.mts +1 -0
  20. package/dist/GeminiTranscriber.test.mjs +125 -0
  21. package/dist/GeminiTranscriber.test.mjs.map +1 -0
  22. package/dist/LyriaGenerator.d.mts +57 -0
  23. package/dist/LyriaGenerator.d.mts.map +1 -0
  24. package/dist/LyriaGenerator.mjs +202 -0
  25. package/dist/LyriaGenerator.mjs.map +1 -0
  26. package/dist/LyriaGenerator.test.d.mts +1 -0
  27. package/dist/LyriaGenerator.test.mjs +138 -0
  28. package/dist/LyriaGenerator.test.mjs.map +1 -0
  29. package/dist/{chunk-CfYAbeIz.mjs → chunk-uyGKjUfl.mjs} +2 -1
  30. package/dist/codec.d.mts +51 -6
  31. package/dist/codec.d.mts.map +1 -1
  32. package/dist/codec.mjs +151 -27
  33. package/dist/codec.mjs.map +1 -1
  34. package/dist/dist-DMsg8YLb.mjs +13782 -0
  35. package/dist/dist-DMsg8YLb.mjs.map +1 -0
  36. package/dist/geminiSpeechCodec.d.mts +37 -0
  37. package/dist/geminiSpeechCodec.d.mts.map +1 -0
  38. package/dist/geminiSpeechCodec.mjs +110 -0
  39. package/dist/geminiSpeechCodec.mjs.map +1 -0
  40. package/dist/geminiSpeechCodec.test.d.mts +1 -0
  41. package/dist/geminiSpeechCodec.test.mjs +78 -0
  42. package/dist/geminiSpeechCodec.test.mjs.map +1 -0
  43. package/dist/index.d.mts +5 -2
  44. package/dist/index.mjs +4 -1
  45. package/dist/magic-string.es-CaWgF-3p.mjs +1013 -0
  46. package/dist/magic-string.es-CaWgF-3p.mjs.map +1 -0
  47. package/dist/models.d.mts +35 -1
  48. package/dist/models.d.mts.map +1 -1
  49. package/package.json +14 -2
  50. package/src/Gemini.ts +53 -18
  51. package/src/GeminiEmbedding.ts +23 -5
  52. package/src/GeminiSynthesizer.test.ts +93 -0
  53. package/src/GeminiSynthesizer.ts +214 -0
  54. package/src/GeminiTranscriber.test.ts +136 -0
  55. package/src/GeminiTranscriber.ts +204 -0
  56. package/src/LyriaGenerator.test.ts +162 -0
  57. package/src/LyriaGenerator.ts +390 -0
  58. package/src/codec.ts +312 -36
  59. package/src/geminiSpeechCodec.test.ts +56 -0
  60. package/src/geminiSpeechCodec.ts +137 -0
  61. package/src/index.ts +3 -0
  62. 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"