@elizaos/service-interfaces 1.6.0-alpha.4

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.
@@ -0,0 +1,200 @@
1
+ import { Service, type UUID } from '@elizaos/core';
2
+ export interface MessageParticipant {
3
+ id: UUID;
4
+ name: string;
5
+ username?: string;
6
+ avatar?: string;
7
+ status?: 'online' | 'offline' | 'away' | 'busy';
8
+ }
9
+ export interface MessageAttachment {
10
+ id: UUID;
11
+ filename: string;
12
+ url: string;
13
+ mimeType: string;
14
+ size: number;
15
+ width?: number;
16
+ height?: number;
17
+ duration?: number;
18
+ thumbnail?: string;
19
+ }
20
+ export interface MessageReaction {
21
+ emoji: string;
22
+ count: number;
23
+ users: UUID[];
24
+ hasReacted: boolean;
25
+ }
26
+ export interface MessageReference {
27
+ messageId: UUID;
28
+ channelId: UUID;
29
+ type: 'reply' | 'forward' | 'quote';
30
+ }
31
+ export interface MessageContent {
32
+ text?: string;
33
+ html?: string;
34
+ markdown?: string;
35
+ attachments?: MessageAttachment[];
36
+ reactions?: MessageReaction[];
37
+ reference?: MessageReference;
38
+ mentions?: UUID[];
39
+ embeds?: Array<{
40
+ title?: string;
41
+ description?: string;
42
+ url?: string;
43
+ image?: string;
44
+ fields?: Array<{
45
+ name: string;
46
+ value: string;
47
+ inline?: boolean;
48
+ }>;
49
+ }>;
50
+ }
51
+ export interface MessageInfo {
52
+ id: UUID;
53
+ channelId: UUID;
54
+ senderId: UUID;
55
+ content: MessageContent;
56
+ timestamp: Date;
57
+ edited?: Date;
58
+ deleted?: Date;
59
+ pinned?: boolean;
60
+ thread?: {
61
+ id: UUID;
62
+ messageCount: number;
63
+ participants: UUID[];
64
+ lastMessageAt: Date;
65
+ };
66
+ }
67
+ export interface MessageSendOptions {
68
+ replyTo?: UUID;
69
+ ephemeral?: boolean;
70
+ silent?: boolean;
71
+ scheduled?: Date;
72
+ thread?: UUID;
73
+ nonce?: string;
74
+ }
75
+ export interface MessageSearchOptions {
76
+ query?: string;
77
+ channelId?: UUID;
78
+ senderId?: UUID;
79
+ before?: Date;
80
+ after?: Date;
81
+ limit?: number;
82
+ offset?: number;
83
+ hasAttachments?: boolean;
84
+ pinned?: boolean;
85
+ mentions?: UUID;
86
+ }
87
+ export interface MessageChannel {
88
+ id: UUID;
89
+ name: string;
90
+ type: 'text' | 'voice' | 'dm' | 'group' | 'announcement' | 'thread';
91
+ description?: string;
92
+ participants?: MessageParticipant[];
93
+ permissions?: {
94
+ canSend: boolean;
95
+ canRead: boolean;
96
+ canDelete: boolean;
97
+ canPin: boolean;
98
+ canManage: boolean;
99
+ };
100
+ lastMessageAt?: Date;
101
+ messageCount?: number;
102
+ unreadCount?: number;
103
+ }
104
+ /**
105
+ * Interface for messaging services
106
+ */
107
+ export declare abstract class IMessageService extends Service {
108
+ static readonly serviceType: "message";
109
+ readonly capabilityDescription = "Message sending, receiving, and management capabilities";
110
+ /**
111
+ * Send a message to a channel
112
+ * @param channelId - Channel ID
113
+ * @param content - Message content
114
+ * @param options - Send options
115
+ * @returns Promise resolving to message ID
116
+ */
117
+ abstract sendMessage(channelId: UUID, content: MessageContent, options?: MessageSendOptions): Promise<UUID>;
118
+ /**
119
+ * Get messages from a channel
120
+ * @param channelId - Channel ID
121
+ * @param options - Search options
122
+ * @returns Promise resolving to array of messages
123
+ */
124
+ abstract getMessages(channelId: UUID, options?: MessageSearchOptions): Promise<MessageInfo[]>;
125
+ /**
126
+ * Get a specific message by ID
127
+ * @param messageId - Message ID
128
+ * @returns Promise resolving to message
129
+ */
130
+ abstract getMessage(messageId: UUID): Promise<MessageInfo>;
131
+ /**
132
+ * Edit a message
133
+ * @param messageId - Message ID
134
+ * @param content - New message content
135
+ * @returns Promise resolving when edit completes
136
+ */
137
+ abstract editMessage(messageId: UUID, content: MessageContent): Promise<void>;
138
+ /**
139
+ * Delete a message
140
+ * @param messageId - Message ID
141
+ * @returns Promise resolving when deletion completes
142
+ */
143
+ abstract deleteMessage(messageId: UUID): Promise<void>;
144
+ /**
145
+ * Add a reaction to a message
146
+ * @param messageId - Message ID
147
+ * @param emoji - Reaction emoji
148
+ * @returns Promise resolving when reaction is added
149
+ */
150
+ abstract addReaction(messageId: UUID, emoji: string): Promise<void>;
151
+ /**
152
+ * Remove a reaction from a message
153
+ * @param messageId - Message ID
154
+ * @param emoji - Reaction emoji
155
+ * @returns Promise resolving when reaction is removed
156
+ */
157
+ abstract removeReaction(messageId: UUID, emoji: string): Promise<void>;
158
+ /**
159
+ * Pin a message
160
+ * @param messageId - Message ID
161
+ * @returns Promise resolving when message is pinned
162
+ */
163
+ abstract pinMessage(messageId: UUID): Promise<void>;
164
+ /**
165
+ * Unpin a message
166
+ * @param messageId - Message ID
167
+ * @returns Promise resolving when message is unpinned
168
+ */
169
+ abstract unpinMessage(messageId: UUID): Promise<void>;
170
+ /**
171
+ * Get available channels
172
+ * @returns Promise resolving to array of channels
173
+ */
174
+ abstract getChannels(): Promise<MessageChannel[]>;
175
+ /**
176
+ * Get channel information
177
+ * @param channelId - Channel ID
178
+ * @returns Promise resolving to channel info
179
+ */
180
+ abstract getChannel(channelId: UUID): Promise<MessageChannel>;
181
+ /**
182
+ * Create a new channel
183
+ * @param name - Channel name
184
+ * @param type - Channel type
185
+ * @param options - Channel options
186
+ * @returns Promise resolving to new channel ID
187
+ */
188
+ abstract createChannel(name: string, type: MessageChannel['type'], options?: {
189
+ description?: string;
190
+ participants?: UUID[];
191
+ private?: boolean;
192
+ }): Promise<UUID>;
193
+ /**
194
+ * Search messages across channels
195
+ * @param query - Search query
196
+ * @param options - Search options
197
+ * @returns Promise resolving to search results
198
+ */
199
+ abstract searchMessages(query: string, options?: MessageSearchOptions): Promise<MessageInfo[]>;
200
+ }
@@ -0,0 +1,67 @@
1
+ import { Service } from '@elizaos/core';
2
+ export interface PdfExtractionResult {
3
+ text: string;
4
+ pageCount: number;
5
+ metadata?: {
6
+ title?: string;
7
+ author?: string;
8
+ createdAt?: Date;
9
+ modifiedAt?: Date;
10
+ };
11
+ }
12
+ export interface PdfGenerationOptions {
13
+ format?: 'A4' | 'A3' | 'Letter';
14
+ orientation?: 'portrait' | 'landscape';
15
+ margins?: {
16
+ top?: number;
17
+ bottom?: number;
18
+ left?: number;
19
+ right?: number;
20
+ };
21
+ header?: string;
22
+ footer?: string;
23
+ }
24
+ export interface PdfConversionOptions {
25
+ quality?: 'high' | 'medium' | 'low';
26
+ outputFormat?: 'pdf' | 'pdf/a';
27
+ compression?: boolean;
28
+ }
29
+ /**
30
+ * Interface for PDF processing services
31
+ */
32
+ export declare abstract class IPdfService extends Service {
33
+ static readonly serviceType: "pdf";
34
+ readonly capabilityDescription = "PDF processing, extraction, and generation capabilities";
35
+ /**
36
+ * Extract text and metadata from a PDF file
37
+ * @param pdfPath - Path to the PDF file or buffer
38
+ * @returns Promise resolving to extracted text and metadata
39
+ */
40
+ abstract extractText(pdfPath: string | Buffer): Promise<PdfExtractionResult>;
41
+ /**
42
+ * Generate a PDF from HTML content
43
+ * @param htmlContent - HTML content to convert to PDF
44
+ * @param options - PDF generation options
45
+ * @returns Promise resolving to PDF buffer
46
+ */
47
+ abstract generatePdf(htmlContent: string, options?: PdfGenerationOptions): Promise<Buffer>;
48
+ /**
49
+ * Convert a document to PDF format
50
+ * @param filePath - Path to the document file
51
+ * @param options - Conversion options
52
+ * @returns Promise resolving to PDF buffer
53
+ */
54
+ abstract convertToPdf(filePath: string, options?: PdfConversionOptions): Promise<Buffer>;
55
+ /**
56
+ * Merge multiple PDF files into one
57
+ * @param pdfPaths - Array of PDF file paths or buffers
58
+ * @returns Promise resolving to merged PDF buffer
59
+ */
60
+ abstract mergePdfs(pdfPaths: (string | Buffer)[]): Promise<Buffer>;
61
+ /**
62
+ * Split a PDF into individual pages
63
+ * @param pdfPath - Path to the PDF file or buffer
64
+ * @returns Promise resolving to array of page buffers
65
+ */
66
+ abstract splitPdf(pdfPath: string | Buffer): Promise<Buffer[]>;
67
+ }
@@ -0,0 +1,240 @@
1
+ import { Service, type UUID } from '@elizaos/core';
2
+ export interface PostMedia {
3
+ id: UUID;
4
+ url: string;
5
+ type: 'image' | 'video' | 'audio' | 'document';
6
+ mimeType: string;
7
+ size: number;
8
+ width?: number;
9
+ height?: number;
10
+ duration?: number;
11
+ thumbnail?: string;
12
+ description?: string;
13
+ altText?: string;
14
+ }
15
+ export interface PostLocation {
16
+ name: string;
17
+ address?: string;
18
+ coordinates?: {
19
+ latitude: number;
20
+ longitude: number;
21
+ };
22
+ placeId?: string;
23
+ }
24
+ export interface PostAuthor {
25
+ id: UUID;
26
+ username: string;
27
+ displayName: string;
28
+ avatar?: string;
29
+ verified?: boolean;
30
+ followerCount?: number;
31
+ followingCount?: number;
32
+ bio?: string;
33
+ website?: string;
34
+ }
35
+ export interface PostEngagement {
36
+ likes: number;
37
+ shares: number;
38
+ comments: number;
39
+ views?: number;
40
+ hasLiked: boolean;
41
+ hasShared: boolean;
42
+ hasCommented: boolean;
43
+ hasSaved: boolean;
44
+ }
45
+ export interface PostContent {
46
+ text?: string;
47
+ html?: string;
48
+ media?: PostMedia[];
49
+ location?: PostLocation;
50
+ tags?: string[];
51
+ mentions?: UUID[];
52
+ links?: Array<{
53
+ url: string;
54
+ title?: string;
55
+ description?: string;
56
+ image?: string;
57
+ }>;
58
+ poll?: {
59
+ question: string;
60
+ options: Array<{
61
+ text: string;
62
+ votes: number;
63
+ }>;
64
+ expiresAt?: Date;
65
+ multipleChoice?: boolean;
66
+ };
67
+ }
68
+ export interface PostInfo {
69
+ id: UUID;
70
+ author: PostAuthor;
71
+ content: PostContent;
72
+ platform: string;
73
+ platformId: string;
74
+ url: string;
75
+ createdAt: Date;
76
+ editedAt?: Date;
77
+ scheduledAt?: Date;
78
+ engagement: PostEngagement;
79
+ visibility: 'public' | 'private' | 'followers' | 'friends' | 'unlisted';
80
+ replyTo?: UUID;
81
+ thread?: {
82
+ id: UUID;
83
+ position: number;
84
+ total: number;
85
+ };
86
+ crossPosted?: Array<{
87
+ platform: string;
88
+ platformId: string;
89
+ url: string;
90
+ }>;
91
+ }
92
+ export interface PostCreateOptions {
93
+ platforms?: string[];
94
+ scheduledAt?: Date;
95
+ visibility?: PostInfo['visibility'];
96
+ replyTo?: UUID;
97
+ thread?: boolean;
98
+ location?: PostLocation;
99
+ tags?: string[];
100
+ mentions?: UUID[];
101
+ enableComments?: boolean;
102
+ enableSharing?: boolean;
103
+ contentWarning?: string;
104
+ sensitive?: boolean;
105
+ }
106
+ export interface PostSearchOptions {
107
+ query?: string;
108
+ author?: UUID;
109
+ platform?: string;
110
+ tags?: string[];
111
+ mentions?: UUID[];
112
+ since?: Date;
113
+ before?: Date;
114
+ limit?: number;
115
+ offset?: number;
116
+ hasMedia?: boolean;
117
+ hasLocation?: boolean;
118
+ visibility?: PostInfo['visibility'];
119
+ sortBy?: 'date' | 'engagement' | 'relevance';
120
+ }
121
+ export interface PostAnalytics {
122
+ postId: UUID;
123
+ platform: string;
124
+ impressions: number;
125
+ reach: number;
126
+ engagement: PostEngagement;
127
+ clicks: number;
128
+ shares: number;
129
+ saves: number;
130
+ demographics?: {
131
+ age?: Record<string, number>;
132
+ gender?: Record<string, number>;
133
+ location?: Record<string, number>;
134
+ };
135
+ topPerformingHours?: Array<{
136
+ hour: number;
137
+ engagement: number;
138
+ }>;
139
+ }
140
+ /**
141
+ * Interface for social media posting services
142
+ */
143
+ export declare abstract class IPostService extends Service {
144
+ static readonly serviceType: "post";
145
+ readonly capabilityDescription = "Social media posting and content management capabilities";
146
+ /**
147
+ * Create and publish a new post
148
+ * @param content - Post content
149
+ * @param options - Publishing options
150
+ * @returns Promise resolving to post ID
151
+ */
152
+ abstract createPost(content: PostContent, options?: PostCreateOptions): Promise<UUID>;
153
+ /**
154
+ * Get posts from timeline or specific user
155
+ * @param options - Search options
156
+ * @returns Promise resolving to array of posts
157
+ */
158
+ abstract getPosts(options?: PostSearchOptions): Promise<PostInfo[]>;
159
+ /**
160
+ * Get a specific post by ID
161
+ * @param postId - Post ID
162
+ * @returns Promise resolving to post info
163
+ */
164
+ abstract getPost(postId: UUID): Promise<PostInfo>;
165
+ /**
166
+ * Edit an existing post
167
+ * @param postId - Post ID
168
+ * @param content - New post content
169
+ * @returns Promise resolving when edit completes
170
+ */
171
+ abstract editPost(postId: UUID, content: PostContent): Promise<void>;
172
+ /**
173
+ * Delete a post
174
+ * @param postId - Post ID
175
+ * @returns Promise resolving when deletion completes
176
+ */
177
+ abstract deletePost(postId: UUID): Promise<void>;
178
+ /**
179
+ * Like/unlike a post
180
+ * @param postId - Post ID
181
+ * @param like - True to like, false to unlike
182
+ * @returns Promise resolving when operation completes
183
+ */
184
+ abstract likePost(postId: UUID, like: boolean): Promise<void>;
185
+ /**
186
+ * Share/repost a post
187
+ * @param postId - Post ID
188
+ * @param comment - Optional comment when sharing
189
+ * @returns Promise resolving to share ID
190
+ */
191
+ abstract sharePost(postId: UUID, comment?: string): Promise<UUID>;
192
+ /**
193
+ * Save/unsave a post
194
+ * @param postId - Post ID
195
+ * @param save - True to save, false to unsave
196
+ * @returns Promise resolving when operation completes
197
+ */
198
+ abstract savePost(postId: UUID, save: boolean): Promise<void>;
199
+ /**
200
+ * Comment on a post
201
+ * @param postId - Post ID
202
+ * @param content - Comment content
203
+ * @returns Promise resolving to comment ID
204
+ */
205
+ abstract commentOnPost(postId: UUID, content: PostContent): Promise<UUID>;
206
+ /**
207
+ * Get comments for a post
208
+ * @param postId - Post ID
209
+ * @param options - Search options
210
+ * @returns Promise resolving to array of comments
211
+ */
212
+ abstract getComments(postId: UUID, options?: PostSearchOptions): Promise<PostInfo[]>;
213
+ /**
214
+ * Schedule a post for later publishing
215
+ * @param content - Post content
216
+ * @param scheduledAt - When to publish
217
+ * @param options - Publishing options
218
+ * @returns Promise resolving to scheduled post ID
219
+ */
220
+ abstract schedulePost(content: PostContent, scheduledAt: Date, options?: PostCreateOptions): Promise<UUID>;
221
+ /**
222
+ * Get analytics for a post
223
+ * @param postId - Post ID
224
+ * @returns Promise resolving to post analytics
225
+ */
226
+ abstract getPostAnalytics(postId: UUID): Promise<PostAnalytics>;
227
+ /**
228
+ * Get trending posts
229
+ * @param options - Search options
230
+ * @returns Promise resolving to trending posts
231
+ */
232
+ abstract getTrendingPosts(options?: PostSearchOptions): Promise<PostInfo[]>;
233
+ /**
234
+ * Search posts across platforms
235
+ * @param query - Search query
236
+ * @param options - Search options
237
+ * @returns Promise resolving to search results
238
+ */
239
+ abstract searchPosts(query: string, options?: PostSearchOptions): Promise<PostInfo[]>;
240
+ }
@@ -0,0 +1,72 @@
1
+ import { Service } from '@elizaos/core';
2
+ /**
3
+ * A standardized representation of a token holding.
4
+ */
5
+ export interface TokenBalance {
6
+ address: string;
7
+ balance: string;
8
+ decimals: number;
9
+ uiAmount?: number;
10
+ name?: string;
11
+ symbol?: string;
12
+ logoURI?: string;
13
+ }
14
+ /**
15
+ * Generic representation of token data that can be provided by various services.
16
+ */
17
+ export interface TokenData {
18
+ id: string;
19
+ symbol: string;
20
+ name: string;
21
+ address: string;
22
+ chain: string;
23
+ sourceProvider: string;
24
+ price?: number;
25
+ priceChange24hPercent?: number;
26
+ priceChange24hUSD?: number;
27
+ volume24hUSD?: number;
28
+ marketCapUSD?: number;
29
+ liquidity?: number;
30
+ holders?: number;
31
+ logoURI?: string;
32
+ decimals?: number;
33
+ lastUpdatedAt?: Date;
34
+ raw?: any;
35
+ }
36
+ /**
37
+ * Interface for a generic service that provides token data.
38
+ */
39
+ export declare abstract class ITokenDataService extends Service {
40
+ static readonly serviceType: "token_data";
41
+ readonly capabilityDescription: string;
42
+ /**
43
+ * Fetches detailed information for a single token.
44
+ * @param address The token's contract address.
45
+ * @param chain The blockchain the token resides on.
46
+ * @returns A Promise resolving to TokenData or null if not found.
47
+ */
48
+ abstract getTokenDetails(address: string, chain: string): Promise<TokenData | null>;
49
+ /**
50
+ * Fetches a list of trending tokens.
51
+ * @param chain Optional: Filter by a specific blockchain.
52
+ * @param limit Optional: Number of tokens to return. Defaults to a service-specific value.
53
+ * @param timePeriod Optional: Time period for trending data (e.g., '24h', '7d'). Defaults to service-specific.
54
+ * @returns A Promise resolving to an array of TokenData.
55
+ */
56
+ abstract getTrendingTokens(chain?: string, limit?: number, timePeriod?: string): Promise<TokenData[]>;
57
+ /**
58
+ * Searches for tokens based on a query string.
59
+ * @param query The search query (e.g., symbol, name, address).
60
+ * @param chain Optional: Filter by a specific blockchain.
61
+ * @param limit Optional: Number of results to return.
62
+ * @returns A Promise resolving to an array of TokenData.
63
+ */
64
+ abstract searchTokens(query: string, chain?: string, limit?: number): Promise<TokenData[]>;
65
+ /**
66
+ * Fetches data for multiple tokens by their addresses on a specific chain.
67
+ * @param addresses Array of token contract addresses.
68
+ * @param chain The blockchain the tokens reside on.
69
+ * @returns A Promise resolving to an array of TokenData. May not include all requested if some are not found.
70
+ */
71
+ abstract getTokensByAddresses(addresses: string[], chain: string): Promise<TokenData[]>;
72
+ }
@@ -0,0 +1,107 @@
1
+ import { Service } from '@elizaos/core';
2
+ export interface TranscriptionOptions {
3
+ language?: string;
4
+ model?: string;
5
+ temperature?: number;
6
+ prompt?: string;
7
+ response_format?: 'json' | 'text' | 'srt' | 'vtt' | 'verbose_json';
8
+ timestamp_granularities?: ('word' | 'segment')[];
9
+ word_timestamps?: boolean;
10
+ segment_timestamps?: boolean;
11
+ }
12
+ export interface TranscriptionResult {
13
+ text: string;
14
+ language?: string;
15
+ duration?: number;
16
+ segments?: TranscriptionSegment[];
17
+ words?: TranscriptionWord[];
18
+ confidence?: number;
19
+ }
20
+ export interface TranscriptionSegment {
21
+ id: number;
22
+ text: string;
23
+ start: number;
24
+ end: number;
25
+ confidence?: number;
26
+ tokens?: number[];
27
+ temperature?: number;
28
+ avg_logprob?: number;
29
+ compression_ratio?: number;
30
+ no_speech_prob?: number;
31
+ }
32
+ export interface TranscriptionWord {
33
+ word: string;
34
+ start: number;
35
+ end: number;
36
+ confidence?: number;
37
+ }
38
+ export interface SpeechToTextOptions {
39
+ language?: string;
40
+ model?: string;
41
+ continuous?: boolean;
42
+ interimResults?: boolean;
43
+ maxAlternatives?: number;
44
+ }
45
+ export interface TextToSpeechOptions {
46
+ voice?: string;
47
+ model?: string;
48
+ speed?: number;
49
+ format?: 'mp3' | 'wav' | 'flac' | 'aac';
50
+ response_format?: 'mp3' | 'opus' | 'aac' | 'flac';
51
+ }
52
+ /**
53
+ * Interface for audio transcription and speech services
54
+ */
55
+ export declare abstract class ITranscriptionService extends Service {
56
+ static readonly serviceType: "transcription";
57
+ readonly capabilityDescription = "Audio transcription and speech processing capabilities";
58
+ /**
59
+ * Transcribe audio file to text
60
+ * @param audioPath - Path to audio file or audio buffer
61
+ * @param options - Transcription options
62
+ * @returns Promise resolving to transcription result
63
+ */
64
+ abstract transcribeAudio(audioPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
65
+ /**
66
+ * Transcribe video file to text (extracts audio first)
67
+ * @param videoPath - Path to video file or video buffer
68
+ * @param options - Transcription options
69
+ * @returns Promise resolving to transcription result
70
+ */
71
+ abstract transcribeVideo(videoPath: string | Buffer, options?: TranscriptionOptions): Promise<TranscriptionResult>;
72
+ /**
73
+ * Real-time speech to text from audio stream
74
+ * @param audioStream - Audio stream or buffer
75
+ * @param options - Speech to text options
76
+ * @returns Promise resolving to transcription result
77
+ */
78
+ abstract speechToText(audioStream: NodeJS.ReadableStream | Buffer, options?: SpeechToTextOptions): Promise<TranscriptionResult>;
79
+ /**
80
+ * Convert text to speech
81
+ * @param text - Text to convert to speech
82
+ * @param options - Text to speech options
83
+ * @returns Promise resolving to audio buffer
84
+ */
85
+ abstract textToSpeech(text: string, options?: TextToSpeechOptions): Promise<Buffer>;
86
+ /**
87
+ * Get supported languages for transcription
88
+ * @returns Promise resolving to array of supported language codes
89
+ */
90
+ abstract getSupportedLanguages(): Promise<string[]>;
91
+ /**
92
+ * Get available voices for text to speech
93
+ * @returns Promise resolving to array of available voices
94
+ */
95
+ abstract getAvailableVoices(): Promise<Array<{
96
+ id: string;
97
+ name: string;
98
+ language: string;
99
+ gender?: 'male' | 'female' | 'neutral';
100
+ }>>;
101
+ /**
102
+ * Detect language of audio file
103
+ * @param audioPath - Path to audio file or audio buffer
104
+ * @returns Promise resolving to detected language code
105
+ */
106
+ abstract detectLanguage(audioPath: string | Buffer): Promise<string>;
107
+ }