1
Install
Python 3.11 or later, then:On Linux, also install PortAudio:
sudo apt install libportaudio2. On macOS and Windows it comes with sounddevice.2
Save the script
Save it as
pearl_quickstart.py.pearl_quickstart.py
3
Run it and talk
Use headphones: a terminal has no echo cancellation, and Pearl would hear itself through your speakers.Your
<AccountId>:<SecretKey> is on the API Access page of your workspace settings (API Authorization). Your <pearlId> is on your Pearl’s overview page, in the Settings popover.Pearl greets you; answer it. On macOS, allow the terminal to use the microphone the first time.Output
How the script works
- The order: create the call, open
url?ticket=…, wait forready, then stream. - The pacing: the sound card hands over 20 ms of the microphone every 20 ms, silence included, which is exactly what Pearl expects.
- The playback: Pearl’s frames go through an 80 ms buffer, which absorbs network jitter.
- The ending: Ctrl+C sends
hangup, answered byended. If Pearl ends the call first, the script prints itsendedand stops.
Next steps
Browser App
The same conversation from a web page.
Stream Call
Every message, audio format, event and limit.

