"read operation timed out" error

This error is a byproduct of a request taking longer than the default timeout value built into the Python SDK, which is 15 seconds.

This shouldn’t be a common occurrence but to allow for the occasional slowdown this setting can be changed like this:

1import assemblyai as aai
2
3aai.settings.api_key = f"{ASSEMBLYAI_API_KEY}"
4aai.settings.http_timeout = 30.0