{"id":143657,"date":"2024-07-03T18:24:24","date_gmt":"2024-07-03T12:54:24","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=143657"},"modified":"2024-09-10T17:43:50","modified_gmt":"2024-09-10T12:13:50","slug":"speech-transcription-using-raspberry-pi-zero","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/speech-transcription-using-raspberry-pi-zero","title":{"rendered":"Speech Transcription Using Raspberry Pi Zero"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"178\" height=\"163\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/efy-tested-1.jpg\" alt=\"EFY Tested DIY\" class=\"wp-image-143513\"\/><\/figure><\/div>\n\n\n<p>In a previous initiative, the <a href=\"https:\/\/www.electronicsforu.com\/electronics-projects\/esp32-chatgpt-terminal\">Speech GPT terminal<\/a> was introduced, which allowed users to ask questions in the terminal and receive spoken answers. This device further enhances the design by using a more powerful board to transcribe audio in real-time. <\/p>\n\n\n\n<p>Audio transcription is useful for recording meeting minutes, converting lectures to text, and various other applications. This device can also aid journalists in transcribing interviews. Here, GPT and a microphone are employed for transcription.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">POC Video Tutorial In English<\/h2>\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<span class=\"a1Cs7Y8uiHNpDQ4jIRcZqTFPkvKyxGlnV\"><div class=\"youtube-embed\" data-video_id=\"Gq5dy_1DIFg\"><iframe loading=\"lazy\" title=\"Speech Transcription Using Raspberry Pi Zero | DIY Project | English | Electronics For You\" width=\"696\" height=\"392\" src=\"https:\/\/www.youtube.com\/embed\/Gq5dy_1DIFg?feature=oembed&#038;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div><\/span>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">POC Video Tutorial In Hindi<\/h2>\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<span class=\"LVr0NIKFuUcQpxMRB44V3NhJX8tnAzuPC3SbS5T1BZZoqbHmwrmjlwv8Iv7xTHCa2fsO9WcoFGysPX7dnkYk\"><div class=\"youtube-embed\" data-video_id=\"7gdQNPlnzx0\"><iframe loading=\"lazy\" title=\"Speech Transcription Using Raspberry Pi Zero | DIY Project | Hindi | Electronics For You\" width=\"696\" height=\"392\" src=\"https:\/\/www.youtube.com\/embed\/7gdQNPlnzx0?feature=oembed&#038;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div><\/span>\n<\/div><\/figure>\n\n\n\n<p>Raspberry Pi Zero is utilised for speech recognition, a form of artificial intelligence programming. Understanding and reproducing phonetics requires significant training and refinement. However, some free open-source software, including Google-STT, can be used for this purpose.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"449\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Authors-prototype-2.jpg\" alt=\"Speech Transcription Using Raspberry Pi Zero\" class=\"wp-image-143663\" style=\"width:530px;height:auto\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Authors-prototype-2.jpg 800w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Authors-prototype-2-500x281.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Authors-prototype-2-748x420.jpg 748w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Authors-prototype-2-696x391.jpg 696w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">Fig. 1: Setup for Speech Transcription Using Raspberry Pi Zero<\/figcaption><\/figure><\/div>\n\n\n<p>The author\u2019s prototype is shown in Fig. 1. The components needed to build this device are listed in the Bill of Materials table.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td colspan=\"2\"><strong>Bill of Materials<\/strong><\/td><\/tr><tr><td><strong>Components<\/strong><\/td><td><strong>Quantity<\/strong><\/td><\/tr><tr><td>Raspberry Pi Zero<\/td><td>1<\/td><\/tr><tr><td>PAM8403<\/td><td>1<\/td><\/tr><tr><td>USB microphone<\/td><td>1<\/td><\/tr><tr><td>OTG cable for connecting USB microphone<\/td><td>1<\/td><\/tr><tr><td>Capacitor C1, C2 (0.1\u00b5F)<\/td><td>2<\/td><\/tr><tr><td>Capacitor C3, C4 (10\u00b5F, 16V)<\/td><td>2<\/td><\/tr><tr><td>Resistors R1, R2 (270-ohm)<\/td><td>2<\/td><\/tr><tr><td>Resistors (R3, R4 (150-ohm)<\/td><td>2<\/td><\/tr><tr><td>8-ohm, 0.5-watt speaker<\/td><td>2<\/td><\/tr><tr><td>On\/off switch<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Circuit and Working<\/strong><\/h2>\n\n\n\n<p>Fig. 2 shows the circuit diagram for speech transcription on Raspberry Pi Zero. It is built using Raspberry Pi Zero, PAM8403 amplifier, two speakers, and a few other components.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero-1024x545.jpg\" alt=\"Circuit diagram of audio output on Pi Zero\" class=\"wp-image-143664\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero-1024x545.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero-500x266.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero-789x420.jpg 789w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero-696x371.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Circuit-diagram-of-audio-output-on-Pi-Zero.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Fig. 2: Circuit diagram of audio output on Pi Zero<\/figcaption><\/figure><\/div>\n\n\n<p>There is no sound output on the Pi Zero board. An HDMI device (for example, a TV) must be connected to the Pi Zero to get sound. <\/p>\n\n\n\n<p>However, there is an easier way, as shown in the schematic. Any two of the four PWM GPIO pins 12, 13, 18, and 19 can be used to force audio output by adding just one line in the \u2018\/boot\/config.txt\u2019 file &#8211; [dtoverlay=audremap,pins_18_13]. <\/p>\n\n\n\n<p>Open the file, go to the bottom, and add this line, followed by a reboot. Next time, the audio signal will be available on those two GPIO pins. Just add a headphone to the IN-L and IN-R to get sound on the headphones. The PAM8403 amplifies the sound further for a speaker. <\/p>\n\n\n\n<p>Fig. 3 shows the image of the OTG cable for connecting the USB microphone.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$&gt; sudo nano \/boot\/\nconfig.txt<\/code><\/pre>\n\n\n\n<p>Add the above line and reboot. For Pi-5 the config.txt may be in another place. This PAM8403 is rated for 5V but works on 3.3V too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Software Configuration<\/strong><\/h2>\n\n\n\n<div class=\"mepr_error\"><div class=\"locked-content\">\n<b>EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.<\/b><\/p>\n<p>Oops! This is an EFY++ article, which means it's our Premium Content. You need to be a Registered User of our website to read its complete content.<\/p>\n<p><b>Good News: <\/b>You can register to our website for FREE! <a href=\"https:\/\/www.electronicsforu.com\/plans\/subscription-plans\" target=\"_blank\" rel=\"noopener\">CLICK HERE<\/a> to register now.<\/p>\n<p><b>Already a registered member? <\/b>If YES, then simply login to you account below. (TIP: Use 'forgot password' feature and reset and save your new password in your browser, if you forgot the last one!)\n<\/div>\n<\/div><div>\n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/www.electronicsforu.com\/login\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/143657\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n      <a href=\"https:\/\/www.electronicsforu.com\/login?action=forgot_password\">Forgot Password<\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In a previous initiative, the Speech GPT terminal was introduced, which allowed users to ask questions in the terminal and receive spoken answers. This device further enhances the design by using a more powerful board to transcribe audio in real-time. Audio transcription is useful for recording meeting minutes, converting lectures to text, and various other [&hellip;]<\/p>\n","protected":false},"author":116810,"featured_media":143663,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,6070,3713,3880],"tags":[1985,1911,110,83,11963],"class_list":{"0":"post-143657","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-advanced-projects","10":"category-premium","11":"category-raspberry-pi-diys","12":"tag-diy-projects","13":"tag-do-it-yourself","14":"tag-electronics-projects","15":"tag-featured","16":"tag-july-2024"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/143657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/116810"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=143657"}],"version-history":[{"count":1,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/143657\/revisions"}],"predecessor-version":[{"id":147747,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/143657\/revisions\/147747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/143663"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=143657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=143657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=143657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}