Skip to content

Download audio cache segments sequentially to avoid API rate limits #97

@enaboapps

Description

@enaboapps

Problem

In OnlineTalkPage.tsx, all missing audio segments are fetched in parallel via Promise.all. For talks with many segments this hammers the TTS API simultaneously, hitting concurrency/rate limits and causing failures.

Solution

Replace the parallel Promise.all fetch with a sequential loop — fetch one segment at a time, update progress after each one.

Changes required

  • app/talk/[id]/OnlineTalkPage.tsx — replace Promise.all(misses.map(...)) with a for...of loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions