Speech recognition in Python made easy | Python Tutorial
Key Takeaways
The AssemblyAI Python SDK is used for speech recognition and speech understanding, allowing users to transcribe and analyze audio data with just a few lines of code. The SDK provides features such as transcription, summarization, and word search, and can be configured to suit specific needs.
Full Transcript
hi everyone this is Patrick from assembly Ai and in this video we're going to take a look at our python SDK so I show you how you can transcribe and analyze audio data with just a few lines of code so let's get started so first let's set up the python SDK and you can find this on GitHub by the way and to install this you can simply say pip install assembly Ai and now let's jump to the code and the first thing we want to do is import assembly AI S A Ai and then you want to set your API key and you can do this by calling ai. settings. API key and here set your key you can get one for free on our website the link will be in the description below or as a second way you could also set this as a environment variable that has to be called assembly AI API key for example if I open my terminal I could here export assembly AI API key and set this as key and then you don't need this line but here we want to do it with the first option next let's learn how we can trans transcribe files with the SDK so for this we create a transcriber instance and then we can call transcriber do transcribe and this works with either a URL to a file or we can also simply pass in a local file so here I prepared a local MP3 file and now this will start the transcription and this function will block until the transcription is completed and then finally we can simply call transcript. text to see the transcript text so let's comment this one out and use the local file and let's run this and see if it works and as you can see here we get the transcription now this transcript object is of the class transcriber do transcript and you can do many more things with this for example you could check the audio duration or you can get the single sentences by calling transcript. getet sentences and then we can iterate over them and print the text again and as you can see here we get the single sentences or instead of the sentences you can also call transcript. getet paragraphs and then iterate over them and here we get the single paragraphs you can also do a word search for example you can call transcript. word search and here as a list you can pass in all the words you want to search for and then you get the matches back so we can iterate over them and then for example we can print found match. text and then match. count and then you can also get the timestamps for each word and also the indices so let's run this and see if it works and as you can see it found president two times and here we get the corresponding timestamps and the indices and it also found people one time and here is the corresponding Tim stamp now let's learn how we can transcribe files asynchronous so as I've mentioned the transcriber do transcribe function will block until the result is finished so we can also call transcribe async and now this will return a future object from the async io Library so let's run this and this will immediately return and then we can do some other stuff so as you can see this immediately returns and we can see the state is running and then at a later time for examp example we can check if the future is done and then we can get the transcript by calling future. result and now this is again the same transcript object that we've seen before for example here we can now print transcript. text and by now hopefully the state is already completed so now here we should see the text and as you can see this worked so this is how you can transcribe files asynchronously now let's learn how you can configure transcription param and also trigger different audio intelligence features so for this you can set up a transcription config and here you can set different parameters for example you can set punctuate should be false and formatting should be false and then you pass this config when you set up your transcriber object so this is the first way how you could do it you can also directly call this on the transcribe function now we do it with the global configuration and then again you call transcriber transcribe and now we Sprint the transcription. text and let's run this and wait until this is done and here again it prints the transcript but this time without punctuation and formatting you can also use the transcription config to set up different audio intelligence features for example let's use the summarization feature so when we set up the transcription config here we set summarization equals true and then you could also optionally set the summary model and the summary type and here we set this to informative and then to bullets and then we can so this is the second way how we can use it we can directly call this on the transcribe function and then it will overwrite the global config and then since we said summarization equals true we can then access transcript. summary so let's run this and as you can see now we get a summary with two bu points so this was a short guide how you can get started with the python SDK I recommend to check out the documentation to see what else you can do with it and I hope you enjoyed this video so if so then please leave us a like and consider subscribing to our Channel and then I hope to see you in next time bye
Original Description
Learn how to get started with the AssemblyAI Python SDK for speech recognition and speech understanding. In just 5 minutes you'll learn how you can transcribe and analyze audio data.
Get your Free Token for AssemblyAI👇
https://www.assemblyai.com/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_pat_77
Python SDK: https://github.com/AssemblyAI/assemblyai-python-sdk
Speech recognition in Python made easy | AssemblyAI Python SDK Tutorial
▬▬▬▬▬▬▬▬▬▬▬▬ CONNECT ▬▬▬▬▬▬▬▬▬▬▬▬
🖥️ Website: https://www.assemblyai.com
🐦 Twitter: https://twitter.com/AssemblyAI
🦾 Discord: https://discord.gg/Cd8MyVJAXd
▶️ Subscribe: https://www.youtube.com/c/AssemblyAI?sub_confirmation=1
🔥 We're hiring! Check our open roles: https://www.assemblyai.com/careers
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#python #speechrecognition
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from AssemblyAI · AssemblyAI · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Python Speech Recognition in 5 Minutes
AssemblyAI
Python Click Part 1 of 4
AssemblyAI
Python Click Part 2 of 4
AssemblyAI
Python Click Part 3 of 4
AssemblyAI
Python Click Part 4 of 4
AssemblyAI
Deep learning in 5 minutes | What is deep learning?
AssemblyAI
How to make a web app that transcribes YouTube videos with Streamlit | Part 1
AssemblyAI
How to make a web app that transcribes YouTube videos with Streamlit | Part 2
AssemblyAI
Batch normalization | What it is and how to implement it
AssemblyAI
Real-time Speech Recognition in 15 minutes with AssemblyAI
AssemblyAI
Regularization in a Neural Network | Dealing with overfitting
AssemblyAI
Add speech recognition to your Streamlit apps in 5 minutes
AssemblyAI
Transformers for beginners | What are they and how do they work
AssemblyAI
Automatic Chapter Detection With AssemblyAI | Python Tutorial
AssemblyAI
Deep Learning Series Part 1 - What is Deep Learning?
AssemblyAI
Deep Learning Series part 2 - Why is it called “Deep Learning”?
AssemblyAI
Activation Functions In Neural Networks Explained | Deep Learning Tutorial
AssemblyAI
Deep Learning Series part 3 - Deep Learning vs. Machine Learning
AssemblyAI
Deep Learning Series part 4 - Why is Deep Learning better for NLP?
AssemblyAI
Intro to Batch Normalization Part 1
AssemblyAI
Intro to Batch Normalization Part 2
AssemblyAI
Intro to Batch Normalization Part 3 - What is Normalization?
AssemblyAI
Intro to Batch Normalization Part 4
AssemblyAI
Intro to Batch Normalization Part 5
AssemblyAI
Sentiment Analysis for Earnings Calls with AssemblyAI
AssemblyAI
Summarizing my favorite podcasts with Python
AssemblyAI
Introduction to Regularization
AssemblyAI
How/Why Regularization in Neural Networks?
AssemblyAI
Getting Started With Torchaudio | PyTorch Tutorial
AssemblyAI
Types of Regularization
AssemblyAI
Tuning Alpha in L1 and L2 Regularization
AssemblyAI
Dropout Regularization
AssemblyAI
What is GPT-3 and how does it work? | A Quick Review
AssemblyAI
Backpropagation For Neural Networks Explained | Deep Learning Tutorial
AssemblyAI
Jupyter Notebooks Tutorial | How to use them & tips and tricks!
AssemblyAI
Best Free Speech-To-Text APIs and Open Source Libraries
AssemblyAI
Regularization - Early stopping
AssemblyAI
Regularization - Data Augmentation
AssemblyAI
Bias and Variance for Machine Learning | Deep Learning
AssemblyAI
Recurrent Neural Networks (RNNs) Explained - Deep Learning
AssemblyAI
What is BERT and how does it work? | A Quick Review
AssemblyAI
Introduction to Transformers
AssemblyAI
Transformers | What is attention?
AssemblyAI
Transformers | how attention relates to Transformers
AssemblyAI
Transformers | Basics of Transformers
AssemblyAI
Supervised Machine Learning Explained For Beginners
AssemblyAI
Transformers | Basics of Transformers Encoders
AssemblyAI
Transformers | Basics of Transformers I/O
AssemblyAI
How to evaluate ML models | Evaluation metrics for machine learning
AssemblyAI
Unsupervised Machine Learning Explained For Beginners
AssemblyAI
Weight Initialization for Deep Feedforward Neural Networks
AssemblyAI
Q-Learning Explained - Reinforcement Learning Tutorial
AssemblyAI
Should You Use PyTorch or TensorFlow in 2022?
AssemblyAI
What is Layer Normalization? | Deep Learning Fundamentals
AssemblyAI
I created a Python App to study FASTER
AssemblyAI
How to create your FIRST NEURAL NETWORK with TensorFlow!
AssemblyAI
Neural Networks Summary: All hyperparameters
AssemblyAI
Getting Started with OpenAI API and GPT-3 | Beginner Python Tutorial
AssemblyAI
Convert Speech-To-Text In Python in 60 seconds!
AssemblyAI
Gradient Clipping for Neural Networks | Deep Learning Fundamentals
AssemblyAI
More on: LLM Foundations
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
I Asked ChatGPT to Fix My Life. It Couldn’t — Until I Changed One Thing
Medium · AI
I Asked ChatGPT to Fix My Life. It Couldn’t — Until I Changed One Thing
Medium · ChatGPT
Claude Sonnet 5 Is Here: Why It Might Replace Your Opus Subscription
Medium · Programming
Claude AI vs ChatGPT: Which One Is Actually Better in 2026?
Medium · AI
🎓
Tutor Explanation
DeepCamp AI