Hello , any idea why i get this error ? STT Gladia...
# ask-ai
p
Hello , any idea why i get this error ? STT Gladia integtration returns 400 bad request
t
Thanks for reaching out, Yassine. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you provide more details about your setup? Specifically: • The parameters you are using for the Gladia STT integration (e.g., language, region, encoding, sample rate, bit depth). • Any additional error logs or messages you received. • Whether you have verified your API key and authentication setup. This information will help pinpoint the issue and provide a solution.
p
I'm using this gladia.STT( translation_enabled=True, languages=["ar", "en"], translation_target_languages=["ar"] )
t
Hey there! To fix that 400 Bad Request error, let’s double-check a couple of things together: • Translation Target Languages: Make sure the
translation_target_languages
parameter is set just right. For example, if you want to translate from Arabic and English to Arabic, your code should look like this:
Copy code
gladia.STT(
    translation_enabled=True,
    languages=["ar", "en"],
    translation_target_languages=["ar"]
)
• Language Codes: Double-check that your language codes (like "ar" for Arabic and "en" for English) are valid BCP-47 codes. • API Key: Make sure your API key is correct and properly set up in your environment or code. If you’re still running into trouble, feel free to share any extra error messages or logs you have, and I’ll be happy to help you sort it out!
t
@polite-oil-10264 I tried this yesterday and I had the same issue, I downgraded to 1.2.1 version and it started working for me see, if that helps
❤️ 1
t
Hey there! It looks like another user found that downgrading to version 1.2.1 fixed the issue. You might want to give version 1.2.1 of the Gladia library a try to see if it helps with that 400 Bad Request error you're seeing. If it’s still acting up after that, just let me know and we’ll figure out the next steps together. I’m here to help!