Skip to content

Conversations

TextFromAudio

The TextFromAudio() function is designed to convert an audio file into text using the Whisper model from OpenAI. This function is part of an API that accepts an audio file and returns the corresponding transcribed text.

1
2
3
4
5
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

blip_obj.TextFromAudio(filename)

This function is particularly useful for applications that require audio content to be converted into text for further processing or analysis. The endpoint ensures that the audio file is accurately transcribed, providing a textual representation of the spoken content.

AudioFromText

The AudioFromText() function is responsible for converting text into an audio file using the OpenAI TTS (Text-to-Speech) model. This function is part of an API that takes text input and produces an audio file as output.

1
2
3
4
5
6
7
8
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

text = "Text to be converted to audio goes here..."
output_file = "docs/myaudio.wav"

blip_obj.AudioFromText(filename=output_file, text=text)

This function is ideal for applications that need to generate spoken versions of text, such as virtual assistants or audio books. The function facilitates the creation of an audio file that can be played back or stored for later use.

TranscriptFromConversation

The TranscriptFromConversation() function transcribes a conversation from an audio file stored in an AWS S3 bucket into a conversational transcript. It supports multiple speakers and different languages.

1
2
3
4
5
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

result = blip_obj.TranscriptFromConversation(s3_uri='docs/conversation.wav', language='spanish', max_speakers=2)

This function is useful for extracting text from audio recordings of conversations, which can then be used for analysis, record-keeping, or accessibility purposes. The function logs the transcription result in the database and returns the transcribed text to the caller.

AudioFromVideo

The AudioFromVideo() function extracts audio from a video file. It requires the file ID of the video as input and returns the extracted audio.

1
2
3
4
5
6
7
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

file_id = "docs/video123.mp4"

result = blip_obj.AudioFromVideo(file_id=file_id)

trimAudioClip

The trimAudioClip() function trims an audio clip based on specified start and end times. It requires the file ID of the audio, the start time in minutes, and the end time in minutes.

1
2
3
4
5
6
7
8
9
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

file_id = "files/audio123.wav"
start_minutes = 1
end_minutes = 3

result = blip_obj.trimAudioClip(file_id=file_id, start_minutes=start_minutes, end_minutes=end_minutes)

TextFromVideo

The TextFromVideo() function extracts text from a video file. It requires the file ID of the video as input and returns the extracted text.

1
2
3
4
5
6
7
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

file_id = "files/video123.mp4"

result = blip_obj.TextFromVideo(file_id=file_id)