{"id":8772,"date":"2022-01-16T14:57:36","date_gmt":"2022-01-16T13:57:36","guid":{"rendered":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/?p=8772"},"modified":"2023-06-24T14:21:45","modified_gmt":"2023-06-24T12:21:45","slug":"speech-to-text-stt-and-text-to-speech-tts-speech-recognition-in-python","status":"publish","type":"post","link":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/","title":{"rendered":"Speech to Text and Text to Speech &#8211; Speech recognition in Python"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\">When we hear about\u00a0<strong>Speech To Text<\/strong>\u00a0(STT) and\u00a0<strong>Text To Speech<\/strong>\u00a0(TTS) we are always dealing with a speech recognition system.\u00a0That is,\u00a0<a href=\"https:\/\/it.wikipedia.org\/wiki\/Sintesi_vocale\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>a real\u00a0speech recognition tool<\/strong><\/a>, this time, made in Python with very few lines of code. Voice recognition systems are a highly requested feature in various types of software.\u00a0Very often, they are used to automate applications in contexts where the user is required to provide specific and repetitive indications.\u00a0For example, in call centers, to implement automatic dictation systems, which allow you to dictate entire speeches to the computer.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Implementing a speech recognition feature from scratch can be a very complex undertaking.&nbsp;Fortunately, thanks to Python and three free libraries,&nbsp;<strong>SpeechRecognition,&nbsp;pyttsx3<\/strong>&nbsp;and&nbsp;<strong>pyaudio<\/strong>&nbsp;, all this can be done in a very short time and with very few lines of code.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In this guide, you will learn how to implement a speech recognition system from scratch.&nbsp;That is, a speech to text (&nbsp;<strong>Speech To Text &#8211; STT<\/strong>&nbsp;) and&nbsp;<strong>Text To Speech (TTS<\/strong>&nbsp;) conversion tool.<\/p>\n\n\n\n<hr>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">READ MORE: <a href=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/how-to-turn-on-text-to-speech\/\" target=\"_blank\" rel=\"noreferrer noopener\">how to turn on text to speech<\/a><\/p>\n\n\n\n<hr>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_87 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">In questo articolo:<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#1_Install_the_required_Python_modules\" >1. Install the required Python modules<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#11_Speech_To_Text_STT_%E2%80%93_From_Spoken_Voice_to_Text\" >1.1 Speech To Text (STT) &#8211; From Spoken Voice to Text<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#12_Text_To_Speech_TTS_%E2%80%93_From_Text_to_Speech\" >1.2 Text To Speech (TTS) &#8211; From Text to Speech<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Install_the_required_Python_modules\"><\/span><strong>1. <strong>Install the required Python modules<\/strong><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">As in any Python project, to implement particular features to a software, it is necessary to install libraries or modules.&nbsp;The libraries in question are&nbsp;<strong>SpeechRecognition,&nbsp;pyttsx3<\/strong>&nbsp;and&nbsp;<strong>pyaudio<\/strong>&nbsp;.&nbsp;To use them, therefore, you must first install them on your computer.&nbsp;Installation is super easy, just run this code from command prompt or Linux terminal:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">pip install speechrecognition\npip install pyaudio\npip install pyttsx3<\/pre>\n\n\n\n<br>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"11_Speech_To_Text_STT_%E2%80%93_From_Spoken_Voice_to_Text\"><\/span><strong>1.1 <strong>Speech To Text (STT) &#8211; From Spoken Voice to Text<\/strong><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Specifically, the\u00a0<strong>SpeechRecognition<\/strong>\u00a0library will allow you to convert the spoken voice into text.\u00a0In the example proposed in this guide, for the conversion, we will use the Google API.\u00a0However, the library supports a considerable number of APIs used for speech recognition.\u00a0<a href=\"https:\/\/pypi.org\/project\/SpeechRecognition\/\" target=\"_blank\" rel=\"noreferrer noopener\">In the examples that can be downloaded from the PyPi home page, it<\/a>\u00a0is possible to search for the\u00a0<strong>SpeechRecognition<\/strong>\u00a0library and try, by copying and pasting the code, inside IDLE, the visual interface provided with Python, the code provided by the developer of the library.<\/p>\n\n\n\n<br>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speechrecognition.jpg\" alt=\"speech to text e text to speech\" class=\"wp-image-8747\" width=\"573\" height=\"382\" srcset=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speechrecognition.jpg 1145w, https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speechrecognition-300x200.jpg 300w, https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speechrecognition-675x450.jpg 675w, https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speechrecognition-768x512.jpg 768w\" sizes=\"auto, (max-width: 573px) 100vw, 573px\" \/><\/figure>\n\n\n\n<br>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">For example, with this code, you can immediately see how to convert your spoken voice to text format and store the conversion in a variable:<\/p>\n\n\n\n<br>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">import speech_recognition as sr\n\n# obtain audio from the microphone\nr = sr.Recognizer()\nwith sr.Microphone() as source:\n    print(\"Say something!\")\n    audio = r.listen(source)\n\n# recognize speech using Google Speech Recognition\ntry:\n    # for testing purposes, we're just using the default API key\n    # to use another API key, use `r.recognize_google(audio, key=\"GOOGLE_SPEECH_RECOGNITION_API_KEY\")`\n    # instead of `r.recognize_google(audio)`\n    print(\"Google Speech Recognition thinks you said \" + r.recognize_google(audio))\nexcept sr.UnknownValueError:\n    print(\"Google Speech Recognition could not understand audio\")\nexcept sr.RequestError as e:\n    print(\"Could not request results from Google Speech Recognition service; {0}\".format(e))\n\n\n<\/pre>\n\n\n\n<br>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In this short video tutorial you can see how to make a\u00a0<strong>Speech To Text<\/strong>\u00a0converter with\u00a0<strong>speechrecognition<\/strong>\u00a0and the very used API, for speech recognition, from Google (\u00a0<strong>Google text-to-speech API<\/strong>\u00a0).<\/p>\n\n\n\n<br>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Python Speech Recognition | Speech To Text Converter | Google Speech\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/GluSLXFGfJ8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/youtu.be\/GluSLXFGfJ8\" target=\"_blank\" rel=\"noreferrer noopener\">Python speech to text converter<\/a><\/figcaption><\/figure>\n\n\n\n<br>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"12_Text_To_Speech_TTS_%E2%80%93_From_Text_to_Speech\"><\/span><strong>1.2 <strong>Text To Speech (TTS) &#8211; From Text to Speech<\/strong><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">AIn the same way as what you did with the\u00a0<strong>speechrecognition<\/strong>\u00a0library you can do the opposite.\u00a0That is, by copying and pasting this code, you can convert a text into a spoken voice.\u00a0The library to use is\u00a0<strong>pyttsx3, also available on the\u00a0<\/strong><a href=\"https:\/\/pypi.org\/project\/pyttsx3\/\" target=\"_blank\" rel=\"noreferrer noopener\">PyPi<\/a>\u00a0portal:<\/p>\n\n\n\n<br>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">import pyttsx3\nengine = pyttsx3.init() # object creation\n\n# RATE\nrate = engine.getProperty('rate')   # getting details of current speaking rate\nprint (rate)                        # printing current voice rate\nengine.setProperty('rate', 125)     # setting up new voice rate\n\n\n# VOLUME\nvolume = engine.getProperty('volume')   # getting to know current volume level (min=0 and max=1)\nprint (volume)                          # printing current volume level\nengine.setProperty('volume',1.0)        # setting up volume level  between 0 and 1\n\n# VOICE\nvoices = engine.getProperty('voices')       # getting details of current voice\n#engine.setProperty('voice', voices[0].id)  # changing index, changes voices. o for male\nengine.setProperty('voice', voices[1].id)   # changing index, changes voices. 1 for female\n\nengine.say(\"Hello World!\")\nengine.say('My current speaking rate is ' + str(rate))\nengine.runAndWait()\nengine.stop()\n\n# Saving Voice to a file\n# On linux make sure that 'espeak' and 'ffmpeg' are installed\nengine.save_to_file('Hello World', 'test.mp3')\nengine.runAndWait()\n<\/pre>\n\n\n\n<br>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Also for&nbsp;<strong>pyttsx3<\/strong>&nbsp;it is good to follow this short video tutorial where you will be able to appreciate how easily you can make a&nbsp;<strong>Text To Speech<\/strong>&nbsp;converter with the&nbsp;<strong>pyttsx3<\/strong>&nbsp;library .Anche per <strong>pyttsx3<\/strong> \u00e8 bene seguire questo breve video tutorial dove avrai modo di apprezzare con quanta semplicit\u00e0 puoi realizzare un convertitore <strong>Text To Speech <\/strong>con la libreria <strong>pyttsx3<\/strong>.<\/p>\n\n\n\n<br>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to use text to speech in python\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/u6cmiBp1obc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/youtu.be\/u6cmiBp1obc\" target=\"_blank\" rel=\"noreferrer noopener\">Python text to speech<\/a><\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Speech to Text functionality is a highly requested feature in various software. With Python and two free libraries it&#8217;s possible.<\/p>\n","protected":false},"author":1,"featured_media":8792,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[268,1059],"tags":[4556,4086,2941,2937,2837,2945,2839,3688,2841,2843],"class_list":["post-8772","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles-en","category-development","tag-google-en","tag-guide-en","tag-how-en","tag-how-to-en","tag-new-en","tag-software-en","tag-to-en","tag-tool-en","tag-tutorial-en","tag-video-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Speech to Text and Text to Speech - Speech recognition in Python<\/title>\n<meta name=\"description\" content=\"Speech to Text functionality is a highly requested feature in various software. With Python and two free libraries it&#039;s possible.\" \/>\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.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speech to Text (STT) and Text to Speech (TTS) - Speech recognition in Python.\" \/>\n<meta property=\"og:description\" content=\"The Speech to Text and Text to Speech features, i.e. translating spoken voice into text and vice versa, are in great demand in various software. With Python and two free libraries it&#039;s possible.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Antonio Lamorgese\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-16T13:57:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-24T12:21:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Antonio Lamorgese\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Speech to Text (STT) and Text to Speech (TTS) - Speech recognition in Python.\" \/>\n<meta name=\"twitter:description\" content=\"The Speech to Text and Text to Speech features, i.e. translating spoken voice into text and vice versa, are in great demand in various software. With Python and two free libraries it&#039;s possible.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@AntonioLamorge3\" \/>\n<meta name=\"twitter:site\" content=\"@AntonioLamorge3\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"Antonio Lamorgese\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/\"},\"author\":{\"name\":\"Antonio Lamorgese\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#\\\/schema\\\/person\\\/264cf3af38edc93a3362a4c47ec5b2f0\"},\"headline\":\"Speech to Text and Text to Speech &#8211; Speech recognition in Python\",\"datePublished\":\"2022-01-16T13:57:36+00:00\",\"dateModified\":\"2023-06-24T12:21:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/\"},\"wordCount\":565,\"publisher\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#\\\/schema\\\/person\\\/264cf3af38edc93a3362a4c47ec5b2f0\"},\"image\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/speech-to-text-in-python.jpg\",\"keywords\":[\"google\",\"Guide\",\"how\",\"how to\",\"new\",\"software\",\"to\",\"tool\",\"tutorial\",\"video\"],\"articleSection\":[\"Blog Articles\",\"Development\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/\",\"url\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/\",\"name\":\"Speech to Text and Text to Speech - Speech recognition in Python\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/speech-to-text-in-python.jpg\",\"datePublished\":\"2022-01-16T13:57:36+00:00\",\"dateModified\":\"2023-06-24T12:21:45+00:00\",\"description\":\"Speech to Text functionality is a highly requested feature in various software. With Python and two free libraries it's possible.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/speech-to-text-in-python.jpg\",\"contentUrl\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/speech-to-text-in-python.jpg\",\"width\":800,\"height\":450,\"caption\":\"speech to text in python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Development\",\"item\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/en\\\/category\\\/development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Speech to Text and Text to Speech &#8211; Speech recognition in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#website\",\"url\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/\",\"name\":\"Antonio Lamorgese\",\"description\":\"Il web e i suoi strumenti operativi\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#\\\/schema\\\/person\\\/264cf3af38edc93a3362a4c47ec5b2f0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/#\\\/schema\\\/person\\\/264cf3af38edc93a3362a4c47ec5b2f0\",\"name\":\"Antonio Lamorgese\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ChiSono.png\",\"url\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ChiSono.png\",\"contentUrl\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ChiSono.png\",\"width\":120,\"height\":130,\"caption\":\"Antonio Lamorgese\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ChiSono.png\"},\"description\":\"Amministratore di rete e sviluppatore. Dopo anni di esperienza nel settore, ho ideato un sistema di gestione dati MYSQL in PHP senza scrivere una sola riga di codice.&nbsp;Scopri di pi\u00f9....\",\"sameAs\":[\"https:\\\/\\\/www.Phpcodewizard.it\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/antonio-lamorgese-660735190\\\/\",\"https:\\\/\\\/pinterest.it\\\/antoniolamorgese9711\\\/\",\"https:\\\/\\\/x.com\\\/AntonioLamorge3\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/antoniolamorgese\",\"https:\\\/\\\/tumblr.com\\\/blog\\\/phpcodewizard\"],\"url\":\"https:\\\/\\\/www.phpcodewizard.it\\\/antoniolamorgese\\\/author\\\/antonio-lamorgese\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Speech to Text and Text to Speech - Speech recognition in Python","description":"Speech to Text functionality is a highly requested feature in various software. With Python and two free libraries it's possible.","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.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/","og_locale":"it_IT","og_type":"article","og_title":"Speech to Text (STT) and Text to Speech (TTS) - Speech recognition in Python.","og_description":"The Speech to Text and Text to Speech features, i.e. translating spoken voice into text and vice versa, are in great demand in various software. With Python and two free libraries it's possible.","og_url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/","og_site_name":"Antonio Lamorgese","article_published_time":"2022-01-16T13:57:36+00:00","article_modified_time":"2023-06-24T12:21:45+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","type":"image\/jpeg"}],"author":"Antonio Lamorgese","twitter_card":"summary_large_image","twitter_title":"Speech to Text (STT) and Text to Speech (TTS) - Speech recognition in Python.","twitter_description":"The Speech to Text and Text to Speech features, i.e. translating spoken voice into text and vice versa, are in great demand in various software. With Python and two free libraries it's possible.","twitter_image":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","twitter_creator":"@AntonioLamorge3","twitter_site":"@AntonioLamorge3","twitter_misc":{"Scritto da":"Antonio Lamorgese","Tempo di lettura stimato":"5 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#article","isPartOf":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/"},"author":{"name":"Antonio Lamorgese","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#\/schema\/person\/264cf3af38edc93a3362a4c47ec5b2f0"},"headline":"Speech to Text and Text to Speech &#8211; Speech recognition in Python","datePublished":"2022-01-16T13:57:36+00:00","dateModified":"2023-06-24T12:21:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/"},"wordCount":565,"publisher":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#\/schema\/person\/264cf3af38edc93a3362a4c47ec5b2f0"},"image":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","keywords":["google","Guide","how","how to","new","software","to","tool","tutorial","video"],"articleSection":["Blog Articles","Development"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/","url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/","name":"Speech to Text and Text to Speech - Speech recognition in Python","isPartOf":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#primaryimage"},"image":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","datePublished":"2022-01-16T13:57:36+00:00","dateModified":"2023-06-24T12:21:45+00:00","description":"Speech to Text functionality is a highly requested feature in various software. With Python and two free libraries it's possible.","breadcrumb":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#primaryimage","url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","contentUrl":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2022\/01\/speech-to-text-in-python.jpg","width":800,"height":450,"caption":"speech to text in python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/speech-to-text-stt-e-text-to-speech-tts-la-sintesi-vocale-in-python-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/"},{"@type":"ListItem","position":2,"name":"Development","item":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/en\/category\/development\/"},{"@type":"ListItem","position":3,"name":"Speech to Text and Text to Speech &#8211; Speech recognition in Python"}]},{"@type":"WebSite","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#website","url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/","name":"Antonio Lamorgese","description":"Il web e i suoi strumenti operativi","publisher":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#\/schema\/person\/264cf3af38edc93a3362a4c47ec5b2f0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":["Person","Organization"],"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/#\/schema\/person\/264cf3af38edc93a3362a4c47ec5b2f0","name":"Antonio Lamorgese","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2019\/06\/ChiSono.png","url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2019\/06\/ChiSono.png","contentUrl":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2019\/06\/ChiSono.png","width":120,"height":130,"caption":"Antonio Lamorgese"},"logo":{"@id":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-content\/uploads\/2019\/06\/ChiSono.png"},"description":"Amministratore di rete e sviluppatore. Dopo anni di esperienza nel settore, ho ideato un sistema di gestione dati MYSQL in PHP senza scrivere una sola riga di codice.&nbsp;Scopri di pi\u00f9....","sameAs":["https:\/\/www.Phpcodewizard.it\/","https:\/\/www.linkedin.com\/in\/antonio-lamorgese-660735190\/","https:\/\/pinterest.it\/antoniolamorgese9711\/","https:\/\/x.com\/AntonioLamorge3","https:\/\/www.youtube.com\/user\/antoniolamorgese","https:\/\/tumblr.com\/blog\/phpcodewizard"],"url":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/author\/antonio-lamorgese\/"}]}},"_links":{"self":[{"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/posts\/8772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/comments?post=8772"}],"version-history":[{"count":1,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/posts\/8772\/revisions"}],"predecessor-version":[{"id":22978,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/posts\/8772\/revisions\/22978"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/media\/8792"}],"wp:attachment":[{"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/media?parent=8772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/categories?post=8772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpcodewizard.it\/antoniolamorgese\/wp-json\/wp\/v2\/tags?post=8772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}