@mastra/voice-google 0.0.0-tsconfig-compile-20250703214351 → 0.0.0-unified-sidebar-20251010130811

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,81 +0,0 @@
1
- import type { google } from '@google-cloud/text-to-speech/build/protos/protos';
2
- import type { google as google_2 } from '@google-cloud/speech/build/protos/protos';
3
- import { MastraVoice } from '@mastra/core/voice';
4
-
5
- /**
6
- * Configuration for Google Cloud Voice models
7
- * @interface GoogleModelConfig
8
- * @property {string} [apiKey] - Optional Google Cloud API key. If not provided, will use GOOGLE_API_KEY environment variable
9
- */
10
- export declare interface GoogleModelConfig {
11
- apiKey?: string;
12
- }
13
-
14
- /**
15
- * GoogleVoice class provides Text-to-Speech and Speech-to-Text capabilities using Google Cloud services
16
- * @class GoogleVoice
17
- * @extends MastraVoice
18
- */
19
- export declare class GoogleVoice extends MastraVoice {
20
- private ttsClient;
21
- private speechClient;
22
- /**
23
- * Creates an instance of GoogleVoice
24
- * @param {Object} config - Configuration options
25
- * @param {GoogleModelConfig} [config.speechModel] - Configuration for speech synthesis
26
- * @param {GoogleModelConfig} [config.listeningModel] - Configuration for speech recognition
27
- * @param {string} [config.speaker] - Default voice ID to use for speech synthesis
28
- * @throws {Error} If no API key is provided via config or environment variable
29
- */
30
- constructor({ listeningModel, speechModel, speaker, }?: {
31
- listeningModel?: GoogleModelConfig;
32
- speechModel?: GoogleModelConfig;
33
- speaker?: string;
34
- });
35
- /**
36
- * Gets a list of available voices
37
- * @returns {Promise<Array<{voiceId: string, languageCodes: string[]}>>} List of available voices and their supported languages. Default language is en-US.
38
- */
39
- getSpeakers({ languageCode }?: {
40
- languageCode?: string;
41
- }): Promise<{
42
- voiceId: string;
43
- languageCodes: string[];
44
- }[]>;
45
- private streamToString;
46
- /**
47
- * Converts text to speech
48
- * @param {string | NodeJS.ReadableStream} input - Text or stream to convert to speech
49
- * @param {Object} [options] - Speech synthesis options
50
- * @param {string} [options.speaker] - Voice ID to use
51
- * @param {string} [options.languageCode] - Language code for the voice
52
- * @param {TextToSpeechTypes.cloud.texttospeech.v1.ISynthesizeSpeechRequest['audioConfig']} [options.audioConfig] - Audio configuration options
53
- * @returns {Promise<NodeJS.ReadableStream>} Stream of synthesized audio. Default encoding is LINEAR16.
54
- */
55
- speak(input: string | NodeJS.ReadableStream, options?: {
56
- speaker?: string;
57
- languageCode?: string;
58
- audioConfig?: google.cloud.texttospeech.v1.ISynthesizeSpeechRequest['audioConfig'];
59
- }): Promise<NodeJS.ReadableStream>;
60
- /**
61
- * Checks if listening capabilities are enabled.
62
- *
63
- * @returns {Promise<{ enabled: boolean }>}
64
- */
65
- getListener(): Promise<{
66
- enabled: boolean;
67
- }>;
68
- /**
69
- * Converts speech to text
70
- * @param {NodeJS.ReadableStream} audioStream - Audio stream to transcribe. Default encoding is LINEAR16.
71
- * @param {Object} [options] - Recognition options
72
- * @param {SpeechTypes.cloud.speech.v1.IRecognitionConfig} [options.config] - Recognition configuration
73
- * @returns {Promise<string>} Transcribed text
74
- */
75
- listen(audioStream: NodeJS.ReadableStream, options?: {
76
- stream?: boolean;
77
- config?: google_2.cloud.speech.v1.IRecognitionConfig;
78
- }): Promise<string>;
79
- }
80
-
81
- export { }
package/dist/index.d.cts DELETED
@@ -1,2 +0,0 @@
1
- export { GoogleModelConfig } from './_tsup-dts-rollup.cjs';
2
- export { GoogleVoice } from './_tsup-dts-rollup.cjs';