@chinchillaenterprises/mcp-ai-assistant
Version:
MCP server for AI assistant with ElevenLabs text-to-speech integration
112 lines • 6.56 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TranscriptionResultSchema = exports.AudioEventSchema = exports.TranscriptionSegmentSchema = exports.SpeakerSchema = exports.TranscriptionJobSchema = exports.CleanupOldJobsArgsSchema = exports.GetUsageStatsArgsSchema = exports.EstimateCostArgsSchema = exports.TranscribeForMeetingArgsSchema = exports.DeleteTranscriptionArgsSchema = exports.ListTranscriptionsArgsSchema = exports.GetTranscriptionResultArgsSchema = exports.GetTranscriptionStatusArgsSchema = exports.TranscribeFileArgsSchema = void 0;
const zod_1 = require("zod");
// Core transcription schemas
exports.TranscribeFileArgsSchema = zod_1.z.object({
filePath: zod_1.z.string().describe("Path to audio/video file or URL"),
fileName: zod_1.z.string().optional().describe("Optional filename override"),
language: zod_1.z.string().optional().describe("Language code (auto-detect if not specified)"),
quality: zod_1.z.enum(['low', 'high']).optional().default('high').describe("Transcription quality level"),
numSpeakers: zod_1.z.number().min(1).max(32).optional().describe("Maximum number of speakers (1-32)"),
diarize: zod_1.z.boolean().optional().describe("Enable speaker diarization (default: true)"),
diarizationThreshold: zod_1.z.number().min(0.1).max(0.4).optional().describe("Diarization threshold (0.1-0.4)")
});
exports.GetTranscriptionStatusArgsSchema = zod_1.z.object({
jobId: zod_1.z.string().describe("Transcription job ID")
});
exports.GetTranscriptionResultArgsSchema = zod_1.z.object({
jobId: zod_1.z.string().describe("Transcription job ID"),
format: zod_1.z.enum(['structured', 'plain', 'vtt', 'srt']).optional().default('structured').describe("Output format")
});
exports.ListTranscriptionsArgsSchema = zod_1.z.object({
status: zod_1.z.enum(['all', 'queued', 'processing', 'completed', 'failed']).optional().default('all').describe("Filter by status"),
limit: zod_1.z.number().optional().default(50).describe("Maximum number of results"),
dateFrom: zod_1.z.string().optional().describe("Filter from date (ISO string)"),
dateTo: zod_1.z.string().optional().describe("Filter to date (ISO string)")
});
exports.DeleteTranscriptionArgsSchema = zod_1.z.object({
jobId: zod_1.z.string().describe("Transcription job ID to delete")
});
// Meeting-optimized transcription schema (Day 4 special feature)
exports.TranscribeForMeetingArgsSchema = zod_1.z.object({
filePath: zod_1.z.string().describe("Path to meeting recording file or URL"),
meetingTitle: zod_1.z.string().optional().describe("Meeting title for context"),
expectedParticipants: zod_1.z.array(zod_1.z.string()).optional().describe("Expected participant names for better speaker identification"),
meetingDuration: zod_1.z.number().optional().describe("Expected duration in minutes for optimization"),
includeActionItems: zod_1.z.boolean().optional().default(true).describe("Extract action items using AI"),
includeKeyTopics: zod_1.z.boolean().optional().default(true).describe("Extract key topics discussed"),
formatForAI: zod_1.z.boolean().optional().default(true).describe("Format output for AI summarization"),
optimizeForBusiness: zod_1.z.boolean().optional().default(true).describe("Use business conversation settings")
});
// Cost management schemas
exports.EstimateCostArgsSchema = zod_1.z.object({
filePath: zod_1.z.string().describe("Path to file for cost estimation"),
estimatedDuration: zod_1.z.number().optional().describe("Estimated duration in minutes (if known)")
});
exports.GetUsageStatsArgsSchema = zod_1.z.object({
accountId: zod_1.z.string().optional().describe("Account ID (uses active account if not specified)"),
period: zod_1.z.enum(['current_month', 'last_month', 'last_3_months', 'all_time']).optional().default('current_month').describe("Time period for stats")
});
exports.CleanupOldJobsArgsSchema = zod_1.z.object({
olderThanDays: zod_1.z.number().optional().default(7).describe("Delete jobs older than this many days"),
keepCompleted: zod_1.z.boolean().optional().default(true).describe("Keep completed transcriptions"),
dryRun: zod_1.z.boolean().optional().default(false).describe("Preview what would be deleted without actually deleting")
});
// Response schemas for validation
exports.TranscriptionJobSchema = zod_1.z.object({
job_id: zod_1.z.string(),
status: zod_1.z.enum(['queued', 'processing', 'completed', 'failed']),
created_at: zod_1.z.string(),
processed_at: zod_1.z.string().optional(),
file_name: zod_1.z.string().optional(),
file_size: zod_1.z.number().optional(),
duration: zod_1.z.number().optional(),
progress: zod_1.z.number().optional(),
error_message: zod_1.z.string().optional()
});
exports.SpeakerSchema = zod_1.z.object({
id: zod_1.z.string(),
name: zod_1.z.string().optional(),
gender: zod_1.z.enum(['male', 'female', 'unknown']).optional(),
age_group: zod_1.z.enum(['child', 'young_adult', 'adult', 'senior', 'unknown']).optional()
});
exports.TranscriptionSegmentSchema = zod_1.z.object({
text: zod_1.z.string(),
speaker: zod_1.z.string(),
start_time: zod_1.z.number(),
end_time: zod_1.z.number(),
confidence: zod_1.z.number(),
words: zod_1.z.array(zod_1.z.object({
word: zod_1.z.string(),
start: zod_1.z.number(),
end: zod_1.z.number(),
confidence: zod_1.z.number()
})).optional()
});
exports.AudioEventSchema = zod_1.z.object({
type: zod_1.z.enum(['laughter', 'applause', 'music', 'silence', 'noise', 'other']),
start_time: zod_1.z.number(),
end_time: zod_1.z.number(),
confidence: zod_1.z.number(),
description: zod_1.z.string().optional()
});
exports.TranscriptionResultSchema = zod_1.z.object({
transcript: zod_1.z.string(),
speakers: zod_1.z.array(exports.SpeakerSchema),
segments: zod_1.z.array(exports.TranscriptionSegmentSchema),
audio_events: zod_1.z.array(exports.AudioEventSchema),
metadata: zod_1.z.object({
file_name: zod_1.z.string(),
file_size: zod_1.z.number(),
duration: zod_1.z.number(),
audio_format: zod_1.z.string(),
sample_rate: zod_1.z.number().optional(),
channels: zod_1.z.number().optional(),
language: zod_1.z.string().optional(),
model_version: zod_1.z.string().optional(),
processing_time: zod_1.z.number().optional(),
cost_estimate: zod_1.z.number().optional()
})
});
//# sourceMappingURL=elevenlabs.js.map