How to Automatically Detect Language in Speech Using Python
6:09

How to Automatically Detect Language in Speech Using Python

AssemblyAI 31.08.2024 3 399 просмотров 47 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
🔑 Get your AssemblyAI API key here: https://www.assemblyai.com/?utm_source=youtube&utm_medium=referral&utm_campaign=yt_smit_24 Automatic Language Detection Docs: https://www.assemblyai.com/docs/speech-to-text/speech-recognition?utm_source=youtube&utm_medium=referral&utm_campaign=yt_smit_24#automatic-language-detection Automatic Language Detection (ALD) identifies the spoken language in an audio file before transcription begins, ensuring that multilingual applications function smoothly without manual language selection. Learn how to use AssemblyAI's Speech Recognition model to Automatically detect Languages in any spoken data like audio and video files. Timestamps: 00:00 - Intro 00:55 - Setup & Installation 01:33 - Automatic Language Detection in python 04:00 - Setting confidence score thresholds for Automatic Language Detection ▬▬▬▬▬▬▬▬▬▬▬▬ CONNECT ▬▬▬▬▬▬▬▬▬▬▬▬ 🖥️ Website: https://www.assemblyai.com 📄 Docs: https://www.assemblyai.com/docs 🐦 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

Оглавление (4 сегментов)

Intro

in this video learn how to automatically detect languages in audio data when you transcribe it using assembly AI API I'll walk you through a simple python script that does this in just a few lines of code we will be making use of assembly AI automatic language detection model in order to detect languages automatically it supports up to 17 languages including Chinese Finnish and Hindi among many others assembly AI also has one of the highest accuracies in detecting languages compared to the leading spech text providers to start off click the link in the description box below to sign up for a free assembly AI API key which will give you $50 worth of free transcription credits to get started after you have signed up for an API key let's head on over to terminal in order to download assembly AI python SDK if you don't want to write this in Python check out our documentation which I'll

Setup & Installation

be leaving in the description box below you can make use of various sdks from C to Java go and even typescript in order to install assembly AIS python SDK I'm going to type in PIP install assembly AI once that is done I'm going to head on over to visual studio code in a python file in Visual Studio code I've already went ahead and imported assembly AI python SDK and also so I have defined my API key next I want to Define our

Automatic Language Detection in python

audio URL you can make use of a URL of an audio file which you're hosting in the cloud or also one which is locally available so here I'm going to be making use of something which is locally available which is my audio1 MP3 file let me play this audio file so you know what it is so this is a Chinese audio from a Chinese TV show and we're going to be making use of that next we're going to set up our config object so let's do config equals to assembly AI do transcription config and here is where we would be setting language detection equals to True uh and this will enable automatic language detection next we are going to create our transcriber object and one of the parameters we're going to pass into our transcriber object is our config lastly we are simply going to transcribe our audio file and retrieve the transcript from assembly AI API once you have written this print statement let's click save and let's run this through terminal in the project folder I'm going to run the command python Alp and within a short amount of time we

Setting confidence score thresholds for Automatic Language Detection

get our Chinese transcript from our audio file using assembly ai's automatic language detection model we don't have to specify exactly which language our audio file is in and that makes it much more streamlined and easier when we are dealing with a large or varied amounts of audio data our latest feature in automatic language detection is also the confidence score allows you to set the minimum confidence level for language detection so for example if you wanted to set a confidence threshold of 0. 4 where anything below 0. 4 should return an error that is a great way to do it and this actually allows you to set your own quality standards when it comes to automatic language detection uh you can also receive alerts for detections which are below your threshold and you also get to control how cases with low confidence are handled now my transcription config I've also included a language confidence threshold and also I've changed my audio URL to audio number two is just a Hindi audio in so let's go ahead and run this so now we've received our transcript for the Hy audio it only Returns the transcript if the confidence value for the language that is being detected is more than 0. 4 or whatever number that we have set if you want to detect languages which are not in the list of the 17 languages supported by automatic language detection you can still make use of assembly AI speech recognition can handle 102 different languages when the language is set manually so you can take a look at our supported languages table which details all of the 102 different languages that we support watch this next video to learn how to build an application that can transcribe and translate any language in an audio file

Другие видео автора — AssemblyAI

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник