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

Conflict in speech-to-text parametrization with provider_params and language selection #77

Closed
gramsc opened this issue Nov 9, 2023 · 1 comment

Comments

@gramsc
Copy link

gramsc commented Nov 9, 2023

In order to use multi-language identification by Amazon, I want to enable the IdentifyMultipleLanguages argument.
Therefore I do not set any language in data.

import requests
import json
 
headers = {"Authorization": "Bearer Your API KEY"}
 
url="[https://api.edenai.run/v2/audio/speech_to_text_async"](https://api.edenai.run/v2/audio/speech_to_text_async%22)
 
amazon_params = json.dumps({"amazon": {"IdentifyMultipleLanguages": True}})
data={"providers": "amazon", "provider_params": amazon_params}
 
files = {'file': open("multilingual_audio.mp3",'rb')}
 
response = requests.post(url, data=data, files=files, headers=headers)
data = response.json()

But it seems like not setting the language in data switches directly to language identification.
In this particular case with Amazon, it seems to be enabling IdentifyLanguage and not the wanted IdentifyMultipleLanguages .

@floflokie
Copy link
Contributor

Hello, in the recent release, IdentityMultipleLanguages is now unabled by default when the language param is null.

@gramsc gramsc closed this as completed Nov 10, 2023
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