Prerequisites for Using the VOXA Player

To utilize the VOXA Player, clients must provide a specific identifier for each audio resource.

Resource ID

This is a unique identifier required for enabling tracking and usage statistics.

How to Obtain the Resource ID

  • From API Response: The resourceId is found in the id field of the API response.
  • From MP3 URL: The resourceId is also at the end of the MP3 URL in the output field.

Example: In this API response, the resourceId is p-Ud0Ukn_f

{
    "id": "p-Ud0Ukn_f",
    "status": "success",
    "error": null,
    "createdAt": "2024-04-18T13:27:11.203Z",
    "renderStartedAt": "2024-04-18T13:27:16.747Z",
    "renderEndedAt": "2024-04-18T13:27:41.695Z",
    "output": "https://files-api.dev.voxa.majelan.audio/.../p-Ud0Ukn_f.mp3",
    "creditsUsed": 243,
    "creditsRemaining": 1536,
    "duration": 19,
}
text

Make sure to provide this resourceId to our player, see the next section for implementation details.

Duration

By default, and in an effort to save your bandwidth, the audio player only loads the audio file after the user clicks on the play button.

This means that the browser won't be able to display the duration before the user clicks.

If you want to display the duration of your audio to the user, you'll have to pass it as a parameter to our player, and much like the resource id, you'll find it in the API response (see example above).