ElevenLabs
Use the ElevenLabs SDK with the Platform: speech to text, text to speech, sound effects, music, dialogue and speech to speech. Change the base URL.
Base URL:
https://platform-api.invideo.io/elevenlabsYour Platform key goes where the ElevenLabs key goes (xi-api-key).
import os
from elevenlabs.client import ElevenLabs
client = ElevenLabs(api_key=os.environ["INVIDEO_API_KEY"], base_url="https://platform-api.invideo.io/elevenlabs")
with open("meeting.mp3", "rb") as audio:
transcript = client.speech_to_text.convert(file=audio, model_id="scribe_v2", diarize=True)
print(transcript.text)import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: process.env.INVIDEO_API_KEY, baseUrl: "https://platform-api.invideo.io/elevenlabs" });
const voiceId = process.env.ELEVENLABS_VOICE_ID;
if (!voiceId) throw new Error("Set ELEVENLABS_VOICE_ID to an ElevenLabs voice ID.");
const audio = await client.textToSpeech.convert(voiceId, { text: "Hello", modelId: "eleven_v3" });| Route | What it runs |
|---|---|
POST /v1/speech-to-text | every speech-to-text model (scribe_v2 is Scribe v2) |
POST /v1/text-to-speech/{voice_id} (and /stream) | every text-to-speech model |
POST /v1/sound-generation, POST /v1/music | sound-effect and music models |
POST /v1/text-to-dialogue | dialogue models (up to four voices) |
POST /v1/speech-to-speech/{voice_id} | speech-to-speech models |
GET /v1/models | the audio models |
model_id is our id or an ElevenLabs id such as eleven_v3, eleven_multilingual_v2 or scribe_v2.
Inputs ElevenLabs has no field for go in extra. Each call returns when the run ends.