Getting Started with Speech Recognition in Python + Speaker Detection
Key Takeaways
The video demonstrates how to use AssemblyAI's speech recognition API in Python, including transcription, speaker detection, and customization options. It covers the basics of setting up an AssemblyAI account, installing the Python SDK, and using the API to transcribe audio files.
Full Transcript
assembly AI is building the best API platform for developers to transform and understand voice data so that they can build amazing new products and services for the world to use you can transcribe your audio data with assembly AI or get a speaker labeled version of your transcription but you can do much more you can get a list of topics discussed whether there was any flaged content in there whether there was any personally sensitive information in there or the sentiment of each of your files you can also use an nlm through assembly AI seamlessly by using our lemur endpoint for everything I mentioned here and more we have a tutorial on our YouTube channel I will leave the links to each of these tutorials in the description below but today in this video let's take a look at how you can start using assembly ai's latest model universal one all right let's get started so all of the code that I'm using here is available on the assembly AI docs so if you just go to assembly ai.com dooc and go to the speech recognition section you will have access to all of the code that I'm building here and actually you could just copy and paste this code if you already log into assembly AI even your API key will be already inserted but to make it easier to follow I will start building the code here as we go along first we need to import assembly ai's python SDK very simply by saying import assembly AI as a AI if you don't have assembly AIS python SDK yet you can easily install it by running the command pip install assembly AI next I just need to set my assembly AI API key if you don't have an assembly AI account yet you can easily go to assembly a.com and create an account in just a couple of minutes and then you will immediately have your API key and then it's time to define the audio data that I'm going to pass to assembly AI you basically have two options for this you can either pass assembly AI a URL a link pointing to a audio or video file or if you have an audio or video file in your own system you can upload it to assembly AI either way it's the same way of working we just need to give it either the path or the link to this file that we have that we want to transcribe I will pass it a sample file that we use quite often where two speakers are uh discussing the Canadian wildfires and then we will Define a transcriber object and through this transcriber object I'm going to call the transcribe Ty function and pass it my audio URL and as a result we're going to get a transcript so let's print this transcript first the response to the transcrip function includes more than just a transcription text it includes some extra information so if you just want the text of this transcription we just need to call transcript. text so let's run this example and then take a look at what the transcription looks like then I'm going to show you some ways of customizing your output with assembly the AI so this is our transcription as you can see it is already finalized it has punctuation it has capitalization of the first letters and also proper nouns let's take a look at some ways to customize our assembly ai's API call so first of all how can you use universal one assembly ai's latest model well fortunately assembly ai's API by default uses Universal One's best tier so when you're calling the transcribe function on the transcriber you are automatically choosing to use the best version the best model assembly AI has to offer if you have a use case where you do not need the best tier speech recognition instead you just want to do some bulk transcription for even a better price then you can use the Nano tier of assem the AI so let me show you how you can do that here so for that we're just going to have to pass a config argument a configuration argument to our transcriber so I will call transcript I config here and then I will specify the speech model so the options are speech model either best which is the default option or you can use Nano which is a less accurate but less expensive option and then we need to pass this configuration to the transcriber we probably won't see a big difference in the example right here in front of us so I'm not going to run this one but I will show you some other configuration changes that you can make for example like we said in the transcription that we got we already have some styling right we have the punctuation we have the capitalization of the relevant sentences and the letters if you want you can turn this off for that you just need to set punctuate to false which is by default true and formatting format text to false and then let's run this example again and see how our transcription is different this time all right let's take a look we do not have punctuations unless it is absolutely relevant and we do not have the capitalization or any other formatting of the text so if you want only the ra text that's the way to go assembly AI by default transcribes the files assuming they're in English but if you have a file that is in another language you can set your language manually on assembly AI for that you just need to make a new line on your configuration and say language code to for example Spanish you can find all the languages assembly AI supports on our documentation if you don't know the language that your audio file is in or you don't want to manually pass it to assembly AI you can also set automatic language detection to True let's see this in an example so now I will pass a audio file that's in Spanish to assembly AI but but I want the text to be punctuated and formatted and I want to use the best possible tier from assembly AI so let's run this and see let's take a look at the results without us specifying to assembly AI that this audio file was in Spanish it understood that it was in Spanish and it gave us a transcription all in Spanish and I know in this audio file we have multiple speakers so let's try to get assembly AI to get us the speaker labels and once again again all I have to do is to add one line where I will set speaker labels to true but this time instead of just printing the text we need to print the results of the speaker diarization all right let's try this out let's take a look at our results this is basically a street interview kind of video so that's why you can see we have a lot of different speakers so speaker a very likely is the interviewer and everyone else all all the way up to speaker f are people that are being interviewed as you can see all of the sentences or the group of sentences are attributed to a speaker if you make an account with assembly AI today you will have access to all of these functionalities and customizations and more only for 37 cents an hour for the best tier and 12 cents an hour for the Nano tier if you want to track your usage you can always go to your assembly AI dashboard where you can see the number of hours you're transcribing and how much it costs you next if you want to learn how to transcribe a stream of audio with assembly AI you can watch this video thank you for watching and we cannot wait to see what you will build with assembly AI
Original Description
Get your AssemblyAI API key for this tutorial: https://www.assemblyai.com/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_mis_62
AssemblyAI is building the best API platform for developers to transform and understand voice data with AI so that you can build amazing new products and services for the world to use.
What is possible with AssemblyAI?
You can transcribe an audio file, get speaker labels, get a list of topics discussed, the sentiment of sentences and much more. Take a look at our docs for a full list of audio intelligence capabilities and customization options of AssemblyAI: https://www.assemblyai.com/docs/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_mis_62
AssemblyAI supports 20 languages including English, Spanish, German, French, Korean, Polish, Turkish, Vietnamese and much more.
In this video, we will get started with AssemblyAI's newest and most accurate model to date: Universal-1.
AssemblyAI docs: https://www.assemblyai.com/docs/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_mis_62
00:00 Introduction
00:49 Simple transcription
03:10 Changing speech recognition model tier
04:32 Customizing the transcription
05:17 Automatic language detection
06:21 Getting speaker labels
07:08 Pricing and AssemblyAI Dashboard
07:31 Next video
▬▬▬▬▬▬▬▬▬▬▬▬ CONNECT ▬▬▬▬▬▬▬▬▬▬▬▬
🖥️ Website: https://www.assemblyai.com/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_mis_62
🐦 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
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#MachineLearning #DeepLearning
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: AI Productivity Tools
View skill →Related Reads
Chapters (8)
Introduction
0:49
Simple transcription
3:10
Changing speech recognition model tier
4:32
Customizing the transcription
5:17
Automatic language detection
6:21
Getting speaker labels
7:08
Pricing and AssemblyAI Dashboard
7:31
Next video
🎓
Tutor Explanation
DeepCamp AI