diff --git a/assemblyai/transcriber.py b/assemblyai/transcriber.py index eee9ba4..ce1df73 100644 --- a/assemblyai/transcriber.py +++ b/assemblyai/transcriber.py @@ -77,7 +77,7 @@ def wait_for_completion(self) -> Self: ): break - time.sleep(3) + time.sleep(self._client.settings.polling_interval) return self diff --git a/assemblyai/types.py b/assemblyai/types.py index 5b584cf..d689c20 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -37,6 +37,9 @@ class Settings(BaseSettings): base_url: str = "https://api.assemblyai.com/v2" "The base URL for the AssemblyAI API" + polling_interval: float = 1.0 + "The default polling interval for long-running requests (e.g. polling the `Transcript`'s status)" + class Config: env_prefix = "assemblyai_" diff --git a/setup.py b/setup.py index c1fbe6c..f7c3223 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="assemblyai", - version="0.8.0", + version="0.8.1", description="AssemblyAI Python SDK", author="AssemblyAI", author_email="engineering.sdk@assemblyai.com",