swagger-api / swagger-api/swagger-ui

Audio returned by POST request is not playable.

Open
#8,378 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: macOS
  • Browser: Chrome
  • Version: [e.g. 22]
  • Method of installation: npm
  • Swagger-UI version: 4.15.5
  • Swagger/OpenAPI version: OpenAPI 3.0
Describe the bug you're encountering

Audio returned by the POST endpoint is not playable, audio element has src attribute set to the audio endpoint (see screenshot), but this is a POST request, not GET, so error is returned to the element.

To reproduce...

Steps to reproduce the behavior:

  1. Create an endpoint that returns audio data on the POST request.
  2. Try the endpoint in Swagger-UI, you will see non-functional audio element grayed out.

You can try it yourself at https://api.elevenlabs.io/docs

Expected behavior

Audio returned by the POST endpoint is playable. The returned data can for example be instead stored as blob and the blob url should be a provided as src attribute to the audio element instead.

Screenshots
image image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Swagger UI with a POST endpoint that returns audio data, such as the linked text-to-speech endpoint, and inspect how the response is rendered in the audio element. Done means audio returned from a POST request plays successfully instead of using the endpoint URL as the element source.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.