{"id":13538,"date":"2020-03-23T14:59:05","date_gmt":"2020-03-23T09:29:05","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/"},"modified":"2025-06-11T00:03:12","modified_gmt":"2025-06-10T18:33:12","slug":"speech-recognition-python","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/","title":{"rendered":"Speech Recognition in Python Tutorial"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"what-is-speech-recognition\">What is Speech Recognition?<\/h2>\n\n\n\n<p>Speech recognition turns spoken language into text. It analyzes audio signals to find patterns and matches them to words. This helps machines understand human speech.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-is-speech-recognition-useful-for-applications\">Why is Speech Recognition useful for Applications?<\/h2>\n\n\n\n<p>Speech recognition makes tasks easier. It helps create accessible apps. It removes typing in many cases and saves time. It reduces errors. You can transcribe meetings. You can dictate documents. You can control smart devices with your voice. It is very useful for virtual assistants, transcription services, and voice-controlled systems.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Academy Pro<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/machine-learning-essentials-with-python\" class=\"courses-cta-title-link\">Learn Machine Learning with Python<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Learn machine learning with Python! Master the basics, build models, and unlock the power of data to solve real-world challenges.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>12 Hrs<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>1 Coding Exercise<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/machine-learning-essentials-with-python\" class=\"courses-cta-button\">\n                Learn Machine Learning with Python\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-steps-to-implement-speech-recognition-in-python\">3 Steps to Implement Speech Recognition in Python<\/h2>\n\n\n\n<p>You can use the <code>SpeechRecognition<\/code> library in Python. This library works with many speech recognition engines and makes the process simple.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-install-necessary-libraries\">Step 1: Install Necessary Libraries<\/h3>\n\n\n\n<p>First, install the <code>SpeechRecognition<\/code> library. Also install <code>PyAudio<\/code>. <code>PyAudio<\/code> lets Python use your microphone.<\/p>\n\n\n\n<p><strong>Install SpeechRecognition:<\/strong> Open your terminal. Run this command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npip install SpeechRecognition\n<\/pre><\/div>\n\n\n<p><strong>Install PyAudio:<\/strong> PyAudio installation can be tricky.<\/p>\n\n\n\n<p>For Windows users: You might need a pre-compiled wheel file. Go to <a href=\"https:\/\/pypi.org\/project\/PyAudio\/#files\" target=\"_blank\" rel=\"noreferrer noopener\">PyPI<\/a>. Find the correct <code>.whl<\/code> file for your Python version and system. Then, install it using <code>pip<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npip install path\/to\/your\/PyAudio\u20110.2.11\u2011cpXX\u2011cpXX\u2011win_amd64.whl\n<\/pre><\/div>\n\n\n<p>You can also try pipwin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npip install pipwin\npipwin install pyaudio\n<\/pre><\/div>\n\n\n<p>For Linux users: Use your system's package manager:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt-get install python3-pyaudio\n<\/pre><\/div>\n\n\n<p>For macOS users:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npip install pyaudio\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-capture-audio-from-your-microphone\">Step 2: Capture Audio from Your Microphone<\/h3>\n\n\n\n<p>Now Python code to capture audio from your microphone using the <code>Recognizer<\/code> class from the SpeechRecognition library.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport speech_recognition as sr\n\n# Create a Recognizer object\nr = sr.Recognizer()\n\n# Use the microphone\nwith sr.Microphone() as source:\n    print(&quot;Speak something...&quot;)\n    # Adjust for background noise\n    r.adjust_for_ambient_noise(source)\n    # Listen for audio\n    audio = r.listen(source)\n    print(&quot;Audio captured.&quot;)\n<\/pre><\/div>\n\n\n<p>This code sets up a Recognizer, opens your microphone, and captures speech. The <code>adjust_for_ambient_noise<\/code> method filters noise to improve accuracy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-convert-speech-to-text\">Step 3: Convert Speech to Text<\/h3>\n\n\n\n<p>After capturing audio, convert it to text using one of the <code>recognize_*<\/code> methods. The SpeechRecognition library supports various APIs, including Google Web Speech API (free for basic use), CMU Sphinx (offline), Google Cloud Speech, IBM Speech-to-Text, and Microsoft Azure Speech.<\/p>\n\n\n\n<p>Here is an example. It uses the Google Web Speech API:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport speech_recognition as sr\n\nr = sr.Recognizer()\n\nwith sr.Microphone() as source:\n    print(&quot;Say something!&quot;)\n    r.adjust_for_ambient_noise(source)\n    audio = r.listen(source)\n\n    try:\n        # Use Google Web Speech API\n        text = r.recognize_google(audio)\n        print(&quot;You said: &quot; + text)\n    except sr.UnknownValueError:\n        print(&quot;Could not understand audio.&quot;)\n    except sr.RequestError as e:\n        print(f&quot;Could not request results from Google Speech Recognition service; {e}&quot;)\n<\/pre><\/div>\n\n\n<p>This code tries to convert the audio to text. It uses <code>recognize_google()<\/code>. It handles errors. These include unclear speech (<code>UnknownValueError<\/code>). It also handles API connection issues (<code>RequestError<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"using-audio-files-for-speech-recognition\">Using Audio Files for Speech Recognition<\/h2>\n\n\n\n<p>You can also transcribe pre-recorded audio. Use the <code>AudioFile<\/code> class. The <code>SpeechRecognition<\/code> library works best with WAV files.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport speech_recognition as sr\nfrom os import path\n\n# Path to your audio file\nAUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), &quot;your_audio_file.wav&quot;)\n\nr = sr.Recognizer()\n\nwith sr.AudioFile(AUDIO_FILE) as source:\n    audio = r.record(source)  # Read the entire file\n\n    try:\n        text = r.recognize_google(audio)\n        print(&quot;Text from audio file: &quot; + text)\n    except sr.UnknownValueError:\n        print(&quot;Could not understand audio from file.&quot;)\n    except sr.RequestError as e:\n        print(f&quot;Could not request results from Google Speech Recognition service; {e}&quot;)\n<\/pre><\/div>\n\n\n<p>Replace \"your_audio_file.wav\" with your actual file path. This setup reads the audio. Then it processes it like microphone input.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Master AI with Microsoft<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/microsoft-ai-professional-online\" class=\"courses-cta-title-link\">Master AI with Microsoft AI Professional Program<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Gain industry-ready AI skills through real-world projects and earn a Microsoft-recognized certification to elevate your tech career.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>Duration: 4 months<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>15+ Live Sessions<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/microsoft-ai-professional-online\" class=\"courses-cta-button\">\n                Start Learning today\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"best-practices-for-speech-recognition\">Best Practices for Speech Recognition<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Handle Errors:<\/strong> Speech recognition isn\u2019t perfect. Use try-except blocks to manage <code>UnknownValueError<\/code> for unclear speech and <code>RequestError<\/code> for API issues.<\/li>\n\n\n\n<li><strong>Adjust for Ambient Noise:<\/strong> Always use <code>r.adjust_for_ambient_noise(source)<\/code> when using a microphone to calibrate the recognizer.<\/li>\n\n\n\n<li><strong>Choose the Right API:<\/strong> For offline recognition, use <code>recognize_sphinx()<\/code>. For better accuracy, opt for cloud APIs like Google Cloud Speech or Microsoft Azure Speech (may require API keys and incur costs).<\/li>\n\n\n\n<li><strong>Clear Audio Input:<\/strong> Audio quality impacts accuracy. Use a clear microphone and minimize background noise.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>Speech recognition in Python is a powerful tool to build interactive applications. The <code>SpeechRecognition<\/code> library makes it easy. You can convert speech to text quickly using this library.<\/p>\n\n\n\n<p>First, install <code>SpeechRecognition<\/code> and <code>PyAudio<\/code>. Then, use <code>Recognizer<\/code> and <code>Microphone<\/code> for live audio. Use <code>AudioFile<\/code> for pre-recorded audio. Finally, use a <code>recognize_*<\/code> method to transcribe.<\/p>\n\n\n\n<p>Try building a voice command script today. Explore the <code>SpeechRecognition<\/code> library's documentation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Speech recognition helps computers understand spoken words. It converts speech into text. This technology lets you build apps that use natural language.<\/p>\n","protected":false},"author":41,"featured_media":13542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[36798],"content_type":[],"class_list":["post-13538","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","tag-nlp"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Speech Recognition Demo in Python<\/title>\n<meta name=\"description\" content=\"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speech Recognition in Python Tutorial\" \/>\n<meta property=\"og:description\" content=\"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-23T09:29:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T18:33:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Speech Recognition in Python Tutorial\",\"datePublished\":\"2020-03-23T09:29:05+00:00\",\"dateModified\":\"2025-06-10T18:33:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/\"},\"wordCount\":506,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/shutterstock_690256654.jpg\",\"keywords\":[\"NLP\"],\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/\",\"name\":\"Speech Recognition Demo in Python\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/shutterstock_690256654.jpg\",\"datePublished\":\"2020-03-23T09:29:05+00:00\",\"dateModified\":\"2025-06-10T18:33:12+00:00\",\"description\":\"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/shutterstock_690256654.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/shutterstock_690256654.jpg\",\"width\":1200,\"height\":700,\"caption\":\"Speech Recognition\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/speech-recognition-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Speech Recognition in Python Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Speech Recognition Demo in Python","description":"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/","og_locale":"en_US","og_type":"article","og_title":"Speech Recognition in Python Tutorial","og_description":"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-03-23T09:29:05+00:00","article_modified_time":"2025-06-10T18:33:12+00:00","og_image":[{"width":1200,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Speech Recognition in Python Tutorial","datePublished":"2020-03-23T09:29:05+00:00","dateModified":"2025-06-10T18:33:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/"},"wordCount":506,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg","keywords":["NLP"],"articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/","url":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/","name":"Speech Recognition Demo in Python","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg","datePublished":"2020-03-23T09:29:05+00:00","dateModified":"2025-06-10T18:33:12+00:00","description":"Learn how speech recognition works in Python. Speech Recognition provides computers the ability to understand natural language like the human mind.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg","width":1200,"height":700,"caption":"Speech Recognition"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/speech-recognition-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Speech Recognition in Python Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",1200,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654-300x175.jpg",300,175,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654-768x448.jpg",768,448,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654-1024x597.jpg",1024,597,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",1200,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",1200,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",640,373,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",96,56,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/03\/shutterstock_690256654.jpg",150,88,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"Speech recognition helps computers understand spoken words. It converts speech into text. This technology lets you build apps that use natural language.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=13538"}],"version-history":[{"count":12,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13538\/revisions"}],"predecessor-version":[{"id":109164,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/13538\/revisions\/109164"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/13542"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=13538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=13538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=13538"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=13538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}