Skip to main content
Answer

AssemblyAI cant configure language.

  • January 19, 2024
  • 2 replies
  • 182 views

Forum|alt.badge.img

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?

Best answer by greenhub

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,

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

Forum|alt.badge.img
  • Author
  • Beginner
  • Answer
  • January 19, 2024

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,


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • February 6, 2024

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!