curl -X POST https://api.case.dev/voice/v1/speak \ -H "Authorization: Bearer sk_case_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "The court finds in favor of the plaintiff.", "voice_id": "EXAVITQu4vr4xnSDxMaL" }' \ --output ruling.mp3
import Casedev from 'casedev';const client = new Casedev({ apiKey: 'sk_case_YOUR_API_KEY' });const audio = await client.voice.v1.speak.create({ text: 'The court finds in favor of the plaintiff.', voice_id: 'EXAVITQu4vr4xnSDxMaL'});// Save to filefs.writeFileSync('ruling.mp3', Buffer.from(audio));
import casedevclient = casedev.Casedev(api_key='sk_case_YOUR_API_KEY')audio = client.voice.v1.speak.create( text='The court finds in favor of the plaintiff.', voice_id='EXAVITQu4vr4xnSDxMaL')with open('ruling.mp3', 'wb') as f: f.write(audio)
audioResp, _ := client.Voice.V1.Speak.New(ctx, casedev.VoiceV1SpeakNewParams{ Text: casedev.F("The court finds in favor of the plaintiff."),})// audioResp is *http.Response with audio body
The casedev CLI does not yet expose a text-to-speech command. Use cURL or one of the supported SDKs above.
const stream = await client.voice.v1.speak.stream({ text: 'This audio starts playing immediately.', voice_id: 'EXAVITQu4vr4xnSDxMaL'});// Pipe to file or audio playerconst writeStream = fs.createWriteStream('streamed.mp3');stream.pipe(writeStream);
audio = client.voice.v1.speak.create( text='This audio starts playing immediately.', voice_id='EXAVITQu4vr4xnSDxMaL')with open('streamed.mp3', 'wb') as f: f.write(audio)
audioResp, _ := client.Voice.V1.Speak.New(ctx, casedev.VoiceV1SpeakNewParams{ Text: casedev.F("The court finds in favor of the plaintiff."),})// audioResp is *http.Response with audio body
The casedev CLI does not yet expose a text-to-speech command. Use cURL or one of the supported SDKs above.
const audio = await client.voice.v1.speak.create({ text: `Summary of Smith v. Hospital: The plaintiff alleges medical malpractice during a surgical procedure on March 15, 2024...`, voice_id: 'EXAVITQu4vr4xnSDxMaL'});
audio = client.voice.v1.speak.create( text='Summary of Smith v. Hospital: The plaintiff alleges medical ' 'malpractice during a surgical procedure on March 15, 2024...', voice_id='EXAVITQu4vr4xnSDxMaL')
resp, _ := client.Voice.V1.Speak.New(ctx, casedev.VoiceV1SpeakNewParams{ Text: casedev.F("Summary of Smith v. Hospital: The plaintiff alleges medical malpractice during a surgical procedure on March 15, 2024..."), VoiceID: casedev.F("EXAVITQu4vr4xnSDxMaL"),})// resp is *http.Response with audio stream
The casedev CLI does not yet expose a text-to-speech command — use cURL or an SDK. You can still browse the voice catalog with casedev voice:v1 list-voices.