Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Audio task accept headers are not respected #351

Open
StephenHodgson opened this issue Nov 16, 2023 · 2 comments
Open

[Bug] Audio task accept headers are not respected #351

StephenHodgson opened this issue Nov 16, 2023 · 2 comments

Comments

@StephenHodgson
Copy link
Contributor

StephenHodgson commented Nov 16, 2023

Is your feature request related to a problem? Please describe.
When settings accept headers to audio/wav or audio/mp3 when making requests to audio inference tasks using api-inference-community 0.0.32+, the returned audio file is still encoded as flac.

Describe the solution you'd like
accept headers respect the types that the client can understand.

Additional context
This is to unblock support for audio tasks in Unity game engine for upcoming hackathon.

I've tried the following tasks | models:

  • text-to-speech | speechbrain/tts-tacotron2-ljspeech
  • text-to-speech | espnet/kan-bayashi_ljspeech_vits
  • audio-to-audio | speechbrain/sepformer-wham

I suspect that the accept headers for images likely also suffer from the same issue, but have not tested.

@StephenHodgson StephenHodgson changed the title [Bug] Text To Speech accept headers are not respected [Bug] Audio task accept headers are not respected Nov 16, 2023
@Wauplin
Copy link
Contributor

Wauplin commented Nov 17, 2023

Hey @StephenHodgson, remind me the discussion and work done in #287, right? Looks like mp3 and wav were not in the list of accepted mime types for audio (see here). EDIT: they were added.

@StephenHodgson
Copy link
Contributor Author

remind me the discussion and work done in #287

Sure 😊 we added support to specify a specific mime return type requested by the client for both image and audio tasks.

Looks like mp3 and wav were not in the list of accepted mime types for audio (see here).

I'm confused because that is the white listed types, and both are in the list.

I thought we had added some tests, and I assumed some tasks would lag behind the release of the api-inference-cimmunity releases. But months later testing this out with multiple different models still I'm unable to get the requested mime types back for audio tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants