openclaw/src/media-understanding/providers/telnyx/index.ts
Franco Viotti c1acc34713
feat(media-understanding): add Telnyx STT provider
Add native Telnyx Speech-to-Text support using the OpenAI-compatible
REST API at https://api.telnyx.com/v2/ai/audio/transcriptions.

- Add telnyxProvider with audio transcription capability
- Reuse transcribeOpenAiCompatibleAudio since Telnyx follows OpenAI format
- Add default model: openai/whisper-large-v3-turbo
- Add tests for the new provider

Co-Authored-By: Claude (anthropic/claude-opus-4-5) <noreply@anthropic.com>
2026-01-30 11:36:06 -03:00

15 lines
463 B
TypeScript

import type { MediaUnderstandingProvider } from "../../types.js";
import { transcribeOpenAiCompatibleAudio } from "../openai/audio.js";
const DEFAULT_TELNYX_AUDIO_BASE_URL = "https://api.telnyx.com/v2/ai";
export const telnyxProvider: MediaUnderstandingProvider = {
id: "telnyx",
capabilities: ["audio"],
transcribeAudio: (req) =>
transcribeOpenAiCompatibleAudio({
...req,
baseUrl: req.baseUrl ?? DEFAULT_TELNYX_AUDIO_BASE_URL,
}),
};