assemblyai

Simple API for quickly transcribing and understanding audio/video files.

source

read_file

 read_file (filename, chunk_size=5242880)

source

AssemblyAI

 AssemblyAI (api_key:str)

AssemblAI class for transcribing

Type Details
api_key str AssemblyAI API Key, Get it for free from https://app.assemblyai.com/

source

AssemblyAI.upload_local_file

 AssemblyAI.upload_local_file (local_file_path:str)

Upload the local file and get audio_url in response, which can be used to sumbit for transcription

Type Details
local_file_path str Local Audio File path

source

AssemblyAI.submit_audio_for_transcription

 AssemblyAI.submit_audio_for_transcription (audio_url:str='',
                                            local_audio_file_path:str='',
                                            sentiment_analysis:bool=False,
                                            auto_chapters:bool=False,
                                            entity_detection:bool=False,
                                            auto_highlights:bool=False,
                                            summarization:bool=False,
                                            summary_type:str='bullets')

Submit Audio URL or the Local file Path for Transcription

Type Default Details
audio_url str Audio URL
local_audio_file_path str Local Audio File Path. Provide audio_url or local_audio_file_path . If both are provided, audio_url is used by default.
sentiment_analysis bool False Include Sentiment Analysis
auto_chapters bool False Include Auto Chapaters
entity_detection bool False Include Entity Detection
auto_highlights bool False Include Auto Highlights
summarization bool False Include Summary
summary_type str bullets If summary is included select summary_type from list [`bullets’, ‘bullets_verbose’, ‘gist’, ‘paragraph’, ‘headline’]. Check out this for more details: https://www.assemblyai.com/docs/audio-intelligence#summarization

source

AssemblyAI.submit_url_for_transcription

 AssemblyAI.submit_url_for_transcription (audio_url:str='',
                                          sentiment_analysis:bool=False,
                                          auto_chapters:bool=False,
                                          entity_detection:bool=False,
                                          auto_highlights:bool=False,
                                          summarization:bool=False,
                                          summary_type:str='bullets')

Submit Audio URL or the Local file Path for Transcription

Type Default Details
audio_url str Audio URL
sentiment_analysis bool False Include Sentiment Analysis
auto_chapters bool False Include Auto Chapaters
entity_detection bool False Include Entity Detection
auto_highlights bool False Include Auto Highlights
summarization bool False Include Summary
summary_type str bullets If summary is included select summary_type from list [`bullets’, ‘bullets_verbose’, ‘gist’, ‘paragraph’, ‘headline’]. Check out this for more details: https://www.assemblyai.com/docs/audio-intelligence#summarization

source

AssemblyAI.get_transcription_results

 AssemblyAI.get_transcription_results (transcripiton_id:str,
                                       all_details:bool=False)

Get the transcription results for the given id

Type Default Details
transcripiton_id str Transcrption ID that we got from submit_url_for_transcription
all_details bool False Include All the details, by default it text and id are returned