Quickstart

Get an API key, install the SDK and transcribe your first recording in five minutes.

Create an API key

Sign in to the console at voice.wistfare.com, open API Keys and create a key. The secret starts with wv_sk_ and is shown once, so copy it somewhere safe.

Export it as an environment variable. The SDKs read WISTFARE_API_KEY automatically, and every example in these docs uses it:

export WISTFARE_API_KEY="wv_sk_..."

The key is all you need. It works on every endpoint, including live transcription over WebSocket.

Install the SDK

pip install wistfareai

Extras: wistfareai[mic] for live transcription from the microphone, wistfareai[numpy] for numpy audio input.

SDK preview

The wistfareai packages for Python (PyPI) and JavaScript (npm) publish soon. Until then, use the cURL tab or any HTTP client: the SDKs are thin wrappers over the same API.

Transcribe a recording

Use any recording: MP3, WAV, M4A, MP4, WEBM, OGG, FLAC or AAC, up to 30 minutes.

transcribe.py
from wistfareai import WistfareAI

client = WistfareAI()  # reads WISTFARE_API_KEY

transcript = client.speech_to_text.convert(
    file="call.wav",              # a path, bytes or an open binary file
    model="wistfare-stt-v3-beta",
    language="auto",              # detect the language of every sentence
    timestamps="word",
    key_terms=["Kigali"],         # names and jargon the model should favour
)

print(transcript.text, f"({transcript.cost_cents}¢)")
for word in transcript.words:
    print(f"{word.start:6.2f}  {word.language}  {word.word}")
python transcribe.py

You get the punctuated transcript, each word with its start time and language, and what the request cost. Here, a speaker switches from English to Kinyarwanda:

{
  "id": "tr_7c31be92a1f04d2e8b9c",
  "text": "Good morning everyone, welcome back. Uyu munsi turaganira ku mibare y'igihembwe.",
  "language": "rw",
  "model": "wistfare-stt-v3-beta",
  "audio_seconds": 5.71,
  "cost_cents": 2
}

File transcription with wistfare-stt-v3-beta costs $0.006 per minute of audio (minimum 2¢ per file), drawn from your prepaid credits. See Pricing & billing.

Generate speech (optional)

The same key turns Kinyarwanda text into speech. List your voices with client.voices.list() (or GET /v1/voices) and pick a voice_id:

audio = client.text_to_speech.convert(
    text="Muraho neza, murakaza neza.",
    voice_id="vc_9f2ae1",
    model="wistfare-tts-v1-beta",
)
with open("muraho.mp3", "wb") as f:
    f.write(audio)  # bytes, plus audio.generation_id, audio.audio_seconds, audio.cost_cents

Next steps

On this page