feat: add Mistral Voxtral transcription support (#228)

This commit is contained in:
jamesdanielwhitford
2026-02-23 23:37:12 +02:00
committed by GitHub
parent 6bda859559
commit cae5b104b3
15 changed files with 496 additions and 65 deletions

View File

@@ -180,10 +180,9 @@ Ask the bot owner to approve with:
const audioAttachment = message.attachments.find(a => a.contentType?.startsWith('audio/'));
if (audioAttachment?.url) {
try {
const { loadConfig } = await import('../config/index.js');
const config = loadConfig();
if (!config.transcription?.apiKey && !process.env.OPENAI_API_KEY) {
await message.reply('Voice messages require OpenAI API key for transcription. See: https://github.com/letta-ai/lettabot#voice-messages');
const { isTranscriptionConfigured } = await import('../transcription/index.js');
if (!isTranscriptionConfigured()) {
await message.reply('Voice messages require a transcription API key. See: https://github.com/letta-ai/lettabot#voice-messages');
} else {
// Download audio
const response = await fetch(audioAttachment.url);