meta counts them by state:
?status=failed lists only the failed files (meta still counts all of them), and
GET /projects/{id}/files/{name} answers one file, the call to poll when you wait for one.
A good polling loop
- Poll
GET /projects/{id}/filesevery 30 to 60 seconds. Files take minutes, and faster polling gains nothing. - Stop when
meta.pendingandmeta.processingare both 0. Files waitpendingwhile the project is stopped, so a loop that runs long should checkGET /projects/{id}/statustoo (When a file stays pending). An API upload or a retry starts a project that ran before; a file copied in with the AWS CLI does not. - Renew the token when a call answers
401, once: a season takes longer than a token lasts (30 minutes). If the new token is refused too, stop: the key pair is wrong. - For many projects, poll each one in turn: 1000 requests a minute is plenty, and a
429says inRetry-Afterhow long to wait.
When a file stays pending
1
Is the project running?
NOT_RUNNING (projectStatus: "stopped"): it stopped itself after being idle, or was stopped.
Start it: POST /projects/{id}/start. A project that stopped itself after its last file starts
on its own within a minute of a new file; one stopped with POST …/stop only when an API upload
in parts completes or a file is retried; one with startOnNewFiles off only on a retry. See
Starting again on a new file.2
Did the service fail?
status: "ERROR" means the service did not launch (lastError says so) or launched and then
stopped working (pod.status is failed, since pod.at). POST /projects/{id}/start replaces
it. A service that has read failed for 2 hours is stopped, and reads NOT_RUNNING.3
Are other files still running?
The service processes a few files at a time; the rest wait
pending until one finishes.
Nothing to do but wait.When a file failed
failureCode says why, when the cause is one you can fix yourself:
hash.
A file the engines failed on
A file whose voice or translation engine reported an error, such as a line the voice could not say, isfailed, not done with silent gaps. Retry it: a retry processes it from the start, so a
voice or engine changed in the config since applies. If it fails again, contact
support with the project id, the file name and its hash, which finds the
file’s log.