Metadata-Version: 2.4
Name: speakvora
Version: 0.5.0
Summary: Speakvora SDK: text to speech, speech to text, phrase library, offline packs, voice agents and live streaming.
License: MIT
Project-URL: Homepage, https://speakvora.com/docs
Project-URL: Repository, https://github.com/eyeguide-dev/speakvora-sdk
Keywords: text-to-speech,tts,speech-to-text,voice,ivr,voice-agent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: stream
Requires-Dist: websockets; extra == "stream"

# speakvora (Python)

```python
from speakvora import Speakvora
sv = Speakvora(os.environ["SPEAKVORA_KEY"])            # get a key at https://speakvora.com/dashboard
clip = sv.speak("Your order has shipped.", voice="af_heart")      # {"url": ..., "format": ...}
sv.prepare(["Your table is ready."])                    # make known lines instant
text = sv.listen(open("q.wav", "rb").read(), format="wav")["text"]
turn = sv.agent("ag_123", agent_key).turn(session="call-1", text="What time do you close?")
```

Errors are `SpeakvoraError` with `status`, `code` and a plain-language `fix`. Live streaming: `pip install "speakvora[stream]"`.
Full reference: https://speakvora.com/docs

## Fast streaming (0.5.0)

`speak()` returns a finished clip (`{"url": ...}`). The API now streams by default, so `speak()` sends `stream=False` for you and your code keeps working. For the fastest first audio (about 50 to 100 ms on the Phonon voices, on every plan) use `speak_stream()`:

```python
s = sv.speak_stream("Your order is ready for pickup.", voice="ph_zoey")
if s.streaming:
    for pcm in s.chunks():      # raw 16-bit mono 24 kHz PCM bytes
        play(pcm)
else:
    download(s.url)             # the line was already stored: play this clip
```

Send the request a moment before you need the audio: it adds about 100 to 150 ms once. Free accounts are spoken on our own machine; paid accounts can also open a session with `sv.stream_direct()`.
