Best answer

AssemblyAI cant configure language.

  • 19 January 2024
  • 2 replies
  • 46 views

Userlevel 1
Badge

I’m using AssemblyAI API to trasncribe audios, there’re ways to configure the language using ‘language_code’ parameter in the SDK but the built-in Zapier only takes the audio url, and there’s no documentation about how to use raw endpoints without the SDK library on python,

Someone know how to do this?

icon

Best answer by greenhub 19 January 2024, 16:01

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 1
Badge

I solved that, i found a way to do this with code:

 

import requests

# URL donde tu archivo de audio está alojado
audio_url = input_data['audio_url']
apikey = input_data['apikey']
# Endpoint para crear una transcripción
transcribe_url = 'https://api.assemblyai.com/v2/transcript'
headers = {
'authorization': apikey,
'content-type': 'application/json'
}
json = {
'audio_url': audio_url,
'language_code': 'es'
}

response = requests.post(transcribe_url, headers=headers, json=json)
return [{'out':response.json()}]

 

Best,

Userlevel 7
Badge +11

Thanks so much for following up to share the helpful solution you found @greenhub! We greatly appreciate this as I’m sure there will be plenty of other folks with a similar use case for AssemblyAI that could benefit from reading your post here! 🤗

Please do reach out in the Community again if you need help with anything else at all, we’d love to hear from you again!