You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Concurrent AsyncTranscript waits can erase an already returned terminal result #308
AsyncTranscript.wait_for_completion() assigns every poll response to the shared transcript object it returns. When two callers wait on the same transcript, an older in-flight poll can land after the other caller already received the terminal result, and it overwrites that result.
Reproduction
At 0ba094c, with a local HTTP server and the public API:
With error, the error reason becomes None. A also goes back to sleep for the polling interval even though the transcript is done. All four combinations (queued/processing then completed/error) reproduce.
Root cause: assemblyai/prerecorded/v2/async_transcript.py assigns self._transcript = await async_api.get_transcript(...) without checking whether another waiter already installed a terminal response.
Related: #282 changes the polling sleep budget, not result ownership. A fix with regression tests follows.
Activity