soniox/soniox-python ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python SDK for the Soniox API that feels easy to use in both sync and async code.
I want two clients, one regular and one async, with simple access to speech to text and text to speech over both REST and realtime streaming. It should also handle voice cloning, usage and cost summaries, usage logs, auth, file uploads, model listings, webhooks, and typed request and response objects.
Please include clear examples for transcribing a local audio file, streaming realtime transcription, generating speech to a file, and realtime text to speech streaming. Make the defaults smart so it reads the API key from an environment variable, but still lets me override it per client if needed. Add helpful docs, tests, and sample code, and make sure the library is easy to install and run with modern Python. If you need to check the latest Soniox API details, look up the current docs online first.