VULAVULA BETA API

Introducing an API solution tailored for Africa’s most widely spoken languages. This Beta API offers transcription and sophisticated analysis capabilities, enabling seamless comprehension and integration, for Sesotho, Afrikaans, South African English and isiZulu. Are you ready to dive in?

We have swagger docs deployed HERE for further information on how to engage with the key

Get your API token

In order to get access to our API, you’re going to need an API token.
  1. Signup and login to Vulavula Beta HERE
  2. Generate a Beta API token. This’ll be used in the X-CLIENT-TOKEN header in your requests
 

TRANSCRIPTION

Let’s get transcribing! 

UPLOAD YOUR SOUND FILE
 

Right now it’s single files only, and is a little fiddly. Check it out in coming weeks and we’ll have a slightly different API

FILE_TO_TRANSCRIBE = “recording.wav”

TRANSPORT_URL = https://beta-vulavula-services.lelapa.ai/api/v1/transport/file-upload
YOUR_CLIENT_TOKEN = “<YOUR CLIENT TOKEN HERE>”

file_size = os.path.getsize(FILE_TO_TRANSCRIBE)
with open(FILE_TO_TRANSCRIBE, ‘rb’) as file:
# Read file
file_content = file.read()
# Encode file content
encoded_content = base64.b64encode(file_content)
audio_blob = encoded_content.decode()
transport_request_body = {
“file_name”: “recording.wav”,
“audio_blob”: audio_blob,
“file_size”: file_size,

}

# Upload file
resp = requests.post(
TRANSPORT_URL,
json=transport_request_body,
headers={
“X-CLIENT-TOKEN”: “<YOUR_CLIENT_TOKEN>”,
},
)

Let’s GET TRANSCRIBING

Once your files have been uploaded, time to kick off the transcription. To receive your results, you’ll need to provide a webhook url which will get called when your transcription is complete

WEBHOOK_URL = “<YOUR WEBHOOK URL HERE>”
upload_id = “<upload ID from transport request>”
TRANSCRIBE_URL = “https://beta-vulavula-services.lelapa.ai/api/v1/transport/file-upload””
process = requests.post(f{TRANSCRIBE_URL}/{upload_id},json={“webhook”:WEBHOOK_URL}, headers=headers)
 

NAMED ENTITY RECOGNITION

 
NER_URL = “https://beta-vulavula-services.lelapa.ai//api/v1/entity_recognition/process”
sentence = “Cyril Ramaphosa is going for a walk in Emfuleni Municipality”
ner = requests.post(NER_URL,json={“encoded_text”: sentence}, headers=headers)