{"id":154876,"date":"2025-01-01T11:11:48","date_gmt":"2025-01-01T05:41:48","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=154876"},"modified":"2025-03-07T17:07:50","modified_gmt":"2025-03-07T11:37:50","slug":"diy-bilingual-translator","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/diy-bilingual-translator","title":{"rendered":"Portable Bilingual Translator with Raspberry Pi Zero"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"178\" height=\"163\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/efy-tested-1.jpg\" alt=\"\" class=\"wp-image-143513\" style=\"width:124px;height:auto\"\/><\/figure><\/div>\n\n\n<p>This system is designed as a bilingual translator, leveraging the GTTS library to support multiple Indian languages, including English (en), Bengali (bn), Gujarati (gu), Hindi (hi), Kannada (kn), Malayalam (ml), Marathi (mr), Tamil (ta), Telugu (te), and Urdu (ur). <\/p>\n\n\n\n<p>The two-letter codes in brackets specify the target language for speech conversion. <\/p>\n\n\n\n<p>For example: gTTS(text=translated_text, lang=dest_lang). <\/p>\n\n\n\n<p>Speech conversion between languages is straightforward\u2014simply adjust the source and target language codes. For instance, Gujarati speech can be translated into Spanish by updating the relevant codes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"poc\">POC Video Tutorial<\/h2>\n\n\n\n<figure class=\"wp-block-embed 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=\"7W02cBfpwVazHFJuht6PgjIsGoODKCyLrTSek4EY1vphUaJoxiRWKsk8EIXZ1tVPlG25L8iQmcBQqzM6FuxN\"><iframe loading=\"lazy\" title=\"Portable Bilingual Translator with Raspberry Pi | Step-by-step Guide with Code | Electronics For You\" width=\"696\" height=\"392\" src=\"https:\/\/www.youtube.com\/embed\/aiXANIPRjHM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><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 board (MOD 1)<\/td><td>1<\/td><\/tr><tr><td>SPI TFT display (MOD 2)<\/td><td>1<\/td><\/tr><tr><td>PAM8403 module (MOD 3)<\/td><td>1<\/td><\/tr><tr><td>Switch (S1, S2)<\/td><td>2<\/td><\/tr><tr><td>Resistors 270\u03a9 (R1, R2)<\/td><td>2<\/td><\/tr><tr><td>Resistors 150\u03a9 (R3, R4)<\/td><td>2<\/td><\/tr><tr><td>10\u00b5F electrolytic capacitors, 16V (C1, C2)<\/td><td>2<\/td><\/tr><tr><td>0.1\u00b5F ceramic capacitors (C3, C4)<\/td><td>2<\/td><\/tr><tr><td>5V DC, 2A power supply adaptor<\/td><td>1<\/td><\/tr><tr><td>Speaker 5W<\/td><td>2<\/td><\/tr><tr><td>USB microphone1<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Additionally, Google Text-To-Speech (gTTS) supports numerous international languages, such as Arabic (ar), Chinese Simplified (zh), Chinese Traditional (zh-tw), Czech (cs), Danish (da), Dutch (nl), English (en), Filipino (fil), Finnish (fi), French (fr), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Korean (ko), Norwegian (no), Polish (pl), Portuguese Brazil (pt-br), Portuguese Portugal (pt), Russian (ru), Spanish (es), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk), Vietnamese (vi), and others.<\/p>\n\n\n\n<p><strong>Also Check:<\/strong> <a href=\"https:\/\/www.electronicsforu.com\/electronics-projects\/speech-transcription-using-raspberry-pi-zero\">Speech Transcription Using Raspberry Pi Zero<\/a><\/p>\n\n\n\n<p>The author\u2019s prototype, featuring a 240&#215;320 display and 5W+5W amplifiers, is shown in Fig. 1.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"450\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1.jpg\" alt=\"Bilingual Translator with Raspberry Pi Zero\" class=\"wp-image-154877\" style=\"width:482px;height:auto\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1.jpg 600w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1-500x375.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1-560x420.jpg 560w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1-80x60.jpg 80w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/12\/Authors-prototype-1-265x198.jpg 265w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">Fig. 1: Author\u2019s prototype of Bilingual Translator with Raspberry Pi Zero<\/figcaption><\/figure><\/div>\n\n\n<p>The testing covered English (en), Gujarati (gu), Bengali (bn), and Hindi (hi) for Indian languages, alongside Russian (ru), Spanish (es), and German (de) for international languages.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#poc\">POC Video Tutorial<\/a><\/li><li><a href=\"#configuration\">Configuration<\/a><\/li><li><a href=\"#sound-output-configuration-on-pi-zero\">Sound Output Configuration on Pi Zero<\/a><\/li><li><a href=\"#overclocking-of-pi-zero\">Overclocking of Pi Zero<\/a><\/li><li><a href=\"#voice-input-to-pi-zero\">Voice Input to Pi Zero<\/a><\/li><li><a href=\"#internet-connection\">Internet Connection<\/a><\/li><li><a href=\"#bilingual-translator-circuit\">Bilingual Translator Circuit<\/a><\/li><li><a href=\"#project-command\">Project Command<\/a><\/li><li><a href=\"#final-setup-and-testing\">Final Setup and Testing<\/a><ul><li><a href=\"#download-source-code\">Download Source Code<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>So, apart from English, Bengali, Gujarati, and Hindi, the accuracy of the outputs in other languages cannot be verified without additional feedback from expert readers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuration\"><strong>Configuration<\/strong><\/h2>\n\n\n\n<p>The device requires a Raspberry Pi Zero installed with the latest Raspbian OS. Python 3 must be installed, along with the required libraries. These can be installed via the Linux terminal using the following commands:<\/p>\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\/154876\" \/>\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><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This system is designed as a bilingual translator, leveraging the GTTS library to support multiple Indian languages, including English (en), Bengali (bn), Gujarati (gu), Hindi (hi), Kannada (kn), Malayalam (ml), Marathi (mr), Tamil (ta), Telugu (te), and Urdu (ur). The two-letter codes in brackets specify the target language for speech conversion. For example: gTTS(text=translated_text, lang=dest_lang). [&hellip;]<\/p>\n","protected":false},"author":116810,"featured_media":154877,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,6070,3713,3880],"tags":[1985,1911,110,12556],"class_list":{"0":"post-154876","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-jan-2025"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/154876","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=154876"}],"version-history":[{"count":2,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/154876\/revisions"}],"predecessor-version":[{"id":159162,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/154876\/revisions\/159162"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/154877"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=154876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=154876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=154876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}