{"id":17718586,"url":"https://github.com/linuxscout/mintiq-raspberry","last_synced_at":"2026-01-07T23:48:26.226Z","repository":{"id":138755217,"uuid":"119257168","full_name":"linuxscout/mintiq-raspberry","owner":"linuxscout","description":"Porting Arabic Speech synthesis on Raspberry","archived":false,"fork":false,"pushed_at":"2018-03-28T11:16:29.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T10:12:32.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuxscout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-28T12:41:36.000Z","updated_at":"2018-03-28T11:16:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"b267e3a3-1ac7-4cd4-94ee-cc1508036eef","html_url":"https://github.com/linuxscout/mintiq-raspberry","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fmintiq-raspberry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fmintiq-raspberry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fmintiq-raspberry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxscout%2Fmintiq-raspberry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxscout","download_url":"https://codeload.github.com/linuxscout/mintiq-raspberry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246467515,"owners_count":20782321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T14:54:55.952Z","updated_at":"2026-01-07T23:48:26.175Z","avatar_url":"https://github.com/linuxscout.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis project aims to integrate arabic text to speach on eSpeak, and describe how to run it together.\n\nThe Objectif is to install a screen reader to allow to read screen in arabic.\n\n## What we need?\n\nAs ingrédiants we need:\n\n1. eSpeak with Arabic support\n2. Mbrola system and voices\n3. Screen Reader\n4. Speech dispatcher\n5. Arabic diacritizer for text.\n\nWe need to run a featured eSpeak TTS with Arabic support, an additional features and voices with Mbrola TTS system to get an best arabic voice. Then we Need also a diacritizer for diacritize texts \\( Tashkeel\\) تشكيل, by using an open source diactrictizer name [Mishkal](http://tahadz.com/mishkal). We need Also a screen reader as[ Orca](https://help.gnome.org/users/orca/stable/) and a[ speech dispatcher](https://devel.freebsoft.org/doc/speechd/speech-dispatcher.html) to configure TTS systems as middleware for voices applications.\n\nOur aim is to get a good arabic voice with a correct as possible by diactrizing text.\n\n## Installation\n\n### Espeak with arabic support\n\n[eSpeakNG](https://github.com/rhdunn/espeak) is a compact, open source, software speech synthesizer for Linux, Windows, and other platforms. It uses a formant synthesis method, providing many languages \\(including arabic since version 1.49.2\\) in a small size. Much of the programming for eSpeakNG's language support is done using rule files with feedback from native speakers.\n\nTo install espeak you can use the following instructions in espeakNG documentaion\n\nFor older version of eSpeak you can dowload a featured binary version from: [ar-espeak](http://arabic-tools.github.io/ar-espeak/).\n\nFor older version, you can only dowload the zipped file for espeak-data compiled to support arabic, from  [ar-espeak](#), choose the file which correspand to your version.\n\nFor example, I use the 1.48.03 version on my Linux machine, I download the[ espeak-data zipped file](https://sourceforge.net/projects/arabic-espeak/files/espeak-data1.48.03.zip/download)\n\n```\n$wget https://sourceforge.net/projects/arabic-espeak/files/espeak-data1.48.03.zip/download\n$ unzip espeak-data1.48.03.zip\n$ cp -R espeak-data ~\n```\n\nThe first step is to download the zipped file, unzip it, and cy the espeak-data to you home user directory, because espeak will test if espeak-data directory is placed in your home, it will used it.\n\nNow you can test espeak by the following command\n\n```sh\n$espeak -v en \"Hello world\"\n```\n\nif espeak work,  you can  list all available voices and language by you test it for arabic language by:\n\n```\n$espeak --voices\n```\n\nIf arabic in listed you can  you test it for arabic language by:\n\n```\n$espeak -v ar \"السلام عليكم\"\n```\n\nThe espeak program will use espeak-data directory placed in your home user directory or the default system directorty   like /usr/share/doc/espeak-data.\n\nThe espeak-data directory contains compiled files and phoneme-data which will be used by espeak . Youmust be care about espeak version.\n\nWe recommand to use new versions which support directly arabic language.\n\n## Mbrola\n\n\u003e You can skip this part, If you don't need to use Mbrola, or you can't\n\n[MBROLA](http://tcts.fpms.ac.be/synthesis/mbrola.html) is an algorithm for speech synthesis, and software which is distributed at no financial cost but in binary form limited to non-commerical use, and a worldwide collaborative project. The MBROLA project web page provides diphone databases for a large number of spoken languages.\n\nThe arabic voice developped by Mbrola is better than native voice given by espeak.\n\nFirst, you must install Mbrola, you can use you package manager or\n\n**For Debian/ubuntu like distributions :**\n\n```\nsudo apt-get install mbrola\n```\n\nArchlinux:\n\n```\n$ sudo pacman -S mbrola\n```\n\nFor Archlinux run on Raspberry, use\n\n```\ncd /tmp\ngit clone git@github.com:saez0pub/mbrola-archlinux-rasberrypi.git\ncd mbrola-archlinux-rasberrypi\nmakepkg -s\nsudo pacman -U ./mbrola-3.02b-4-armv6h.pkg.tar.xz\n```\n\nNow, You can test Mbrola by\n\n```\n$ mbrola\n```\n\nTo run Mbrola, we need to download voices:\n\n* English:\n\n* * [us1: American English Female \\(6.8Mb\\)](http://www.tcts.fpms.ac.be/synthesis/mbrola/dba/us1/us1-980512.zip)  [Babel Technology](mailto:secr%40babeltech.be)\n  * [us2: American English Male \\(6.3Mb\\)](http://www.tcts.fpms.ac.be/synthesis/mbrola/dba/us2/us2-980812.zip) [Babel Technology](mailto:secr%40babeltech.be)\n  * [us3: American English Male \\(6.1Mb\\)](http://www.tcts.fpms.ac.be/synthesis/mbrola/dba/us3/us3-990208.zip) [Mike Macon](mailto:macon%40cse.ogi.edu)\n* Arabic:\n\n  * [ar1: Arabic Male \\(5.1Mb\\)](http://www.tcts.fpms.ac.be/synthesis/mbrola/dba/ar1/ar1-981103.zip) [Faculte Polytech. De Mons](mailto:mbrola%40tcts.fpms.ac.be)\n  * [ar2: Arabic Male \\(5.6Mb\\)](http://www.tcts.fpms.ac.be/synthesis/mbrola/dba/ar2/ar2-001015.zip) [Abdel Muez Abukhalaf](mailto:amuez%40sedco-online.com)\n\n  After download, unzip files, and copy the files ar1, ar2 into the specific directory\n\nDebian/Ubuntu/ Archlinux\n\n```\n$ mkdir -p /usr/share/mbrola/voices\n$ cp ar1 /usr/share/mbrola/voices/\n$ cp ar2 /usr/share/mbrola/voices/\n```\n\nNow, You can test it with espeak\n\n* ```\n  $ espeak -v mb-en1 \"Hello World\"\n  $ espeak -v mb-ar1 \"السلام عليكم\"\n  ```\n\n## Configure a Screen Reader\n\nWe can use Orca Screen reader,\n\nInstall Orca\n\nConfigure Orca\n\nYou can test orca on desktop, orca use speech-dispatcher.\n\nrun on console within desktop\n\n```\n$ orca -s\n```\n\nGet the following Screen\n\n![](/assets/Screen Reader Preferences_002.png)\n\nFrom the dialog window, go to voice tab, then specify which person voice to use, Here we select Arabic default voice.\n\nTo test it, you can rerun orca with new configuration by the command line\n\n```\n$orca -r\n```\n\n## Diacritizer\n\nIn order to improve arabic Text to Speech, we propose to use a diacritizer. Arabic text comes usaully without short vowels, for this reason, we need to add short vowels to it, this process is called diacritizion.\n\nThe Idea is to use diacritizer as a wraper, it take text, diacritize it, before passing by the TTS system.\n\nWe will use [Mishkal: open source Arabic text diacritizer](http://tahadz.com/mishkal); Mishkal is written by Python langaue, it's open source. it has console, desktop and web interfaces.\n\nWe will use i as console command.\n\nTo install it, download it from [http://mishkal.sourceforge.net](http://mishkal.sourceforge.net), in many packaging versions for your distribution, or get it from github.\n\n```\n$ git clone https://github.com/linuxscout/mishkal.git\n```\n\ncopy the files into a directory, I choose here to put it in my home user directory\n\n```\n/home/me/mishkal-master/\n```\n\nYou can test it by python 2.7\n\n```\n$python2 mishkal-master/bin/mishkal-console.py \n(C) CopyLeft 2012, Taha Zerrouki\nUsage: mishkal-console -f filename [OPTIONS]\n       mishkal-console 'السلام عليكم' [OPTIONS]\n\n        [-f | --file = filename]input file to mishkal-console\n        [-h | --help]     outputs this usage message\n        [-v | --version]  program version\n        [-p | --progress]  display progress status\n\n        * Tashkeel Actions\n        -------------------\n        [-r | --reduced]  Reduced Tashkeel.\n        [-s | --strip]    Strip tashkeel (remove harakat).\n        [-c | --compare]  compare the vocalized text with the program output\n\n        * Tashkeel Options\n        ------------------\n        [-l | --limit]    vocalize only a limited number of line\n        [-x | --syntax]   disable syntaxic analysis\n        [-m | --semantic] disable semantic analysis\n        [-i | --ignore]   ignore the last Mark on output words.\n        [-t | --stat]     disable statistic tashkeel\n\nThis program is licensed under the GPL License\n```\n\nTo test it with text\n\n```\n$python2 mishkal-master/bin/mishkal-console.py  \"السلام عليكم\"\n السِّلَام عَلَيْكُمْ\n```\n\nYou can also use Mishkal as graphical interface\n\n```\n$python2 mishkal-master/interfaces/gui/mishkal-gui.py\n```\n\n![](/assets/mishkal-gui.png)\n\nAlso, You can run it as web server, this option allow you to run it like the online website\n\n```\n$python2 mishkal-master/interfaces/web/mishkal-webserver.py\nserving on 0.0.0.0:8080 view at http://127.0.0.1:8080\n```\n\nThen, run your browser on URL :  [http://127.0.0.1:8080](http://127.0.0.1:8080)\n\n![](/assets/mishkal-web4.png)\n\nThe webserver provide an API, to be used for developement of other apps.\n\n## Integration\n\nNow, we can proceed to integrate Diacritizer with TTS.\n\nFirst, we test espeak with Mishkal by using pipe\n\n```\n$python2 mishkal-master/bin/mishkal-console.py  \"السلام عليكم\" | espeak -v ar\n```\n\nSecond, we test it with Mbrola voices\n\n```\n$python2 mishkal-master/bin/mishkal-console.py  \"السلام عليكم\" | espeak -v mb-ar1\n```\n\n### Configure Speech-dispatcher\n\nInstall Speech Dispatcher\n\nInstall the packages for Speech Dispatcher from your distribution or download the source tarball \\(or git\\) from [http://www.freebsoft.org/speechd](http://www.freebsoft.org/speechd) and follow the instructions in the file `INSTALL` in the source tree.\n\nConfigure Speech Dispatcher\n\nYou can skip this step in most cases. If you however want to setup your own configuration of the Dispatchers default values, the easiest way to do so is through the `spd-conf` configuration script. It will guide you through the basic configuration. It will also subsequently perform some diagnostics tests and offer some limited help with troubleshooting. Just execut\n\n```\n$spd-conf\n```\n\nTest Speech Dispatcher\n\nThe simplest way to test Speech Dispatcher is through `spd-conf -d` or through the `spd-say` tool.\n\nExample:\n\n```\nspd-conf -d\nspd-say \"Hello!\"\nspd-say -l cs -r 90 \"Ahoj\"\n```\n\n#### How to use eSpeak with MBROLA\n\nConfiguration will be generated in .config/speech-dispatcher  in the home user directory.\n\nCheck the ‘modules/espeak-mbrola-generic.conf’ configuration files for the `AddVoice` lines. If a line for any of the voices you have installed \\(and it is supported by your version of eSpeak, e.g. `ls /usr/share/espeak-data/voices/mb/mb-*`\\) is not contained here, please add it.\n\nCheck if `GenericExecuteString` contains the correct name of your mbrola binary and correct path to its voice database.\n\nUncomment the `AddModule` line for `espeak-mbrola-generic` in ‘speechd.conf’ in your configuration for Speech Dispatcher.\n\nRestart speech-dispatcher and in your client, select `espeak-mbrola-generic` as your output module, or test it with the following command\n\n```\nspd-say -o espeak-mbrola-generic -l en Testing\n```\n\n#### \n\nEdit the file\n\n```\nnano .config/speech-dispatcher/modules/espeak-mbrola-generic.conf\n```\n\nAdding Arabic language,  go to GenericLanguage     section, add the following line at the end of list\n\n```\nGenericLanguage          \"ar\" \"ar\" \"utf-8\"\n```\n\nGo to AddVoice section and add this lines\n\n```\nAddVoice        \"ar\"    \"MALE1\"        \"ar1\"\nAddVoice        \"ar\"    \"FEMALE1\"    \"ar1\"\nAddVoice        \"ar\"    \"MALE1\"         \"ar2\"\nAddVoice        \"ar\"    \"FEMALE1\"       \"ar2\"\n```\n\nRestart speech-dispatcher and in your client, select `espeak-mbrola-generic` as your output module, or test it with the following command\n\n```\nspd-say -o espeak-mbrola-generic -l en Testing\n```\n\nNow test it with Arabic\n\n```\nspd-say -o espeak-mbrola-generic -l ar \"السلام عليكم\"\n```\n\n#### How to add diacritizer to speech-dispatcher\n\nEdit the file\n\n```\nnano .config/speech-dispatcher/modules/espeak-mbrola-generic.conf\n```\n\nNow,  The check GenericExecuteSynth section\n\n```\nGenericExecuteSynth \\\n\"echo \\'$DATA\\' | espeak -v mb-$VOICE -s $RATE -p $PITCH $PUNCT -q --stdin --pho | mbrola -v $VOLUME -e /usr/share/mbrola/$VOICE/$VOICE - -.au | $PLAY_COMMAND\"\n```\n\nPlease check if your voices are in direcotirs like this  /usr/share/mbrola/$VOICE/$VOICE\n\nfor exmaple, english voice are placed in /usr/share/mbrola/en1/en1\n\nIt's not the case, please change the mbrola path in this command to be\n\n```\n/usr/share/mbrola/voices/$VOICE\n```\n\nWhich means that all voices are in the same directory.\n\nThe command will be like this\n\n```\nGenericExecuteSynth \\\n\"echo \\'$DATA\\' | espeak -v mb-$VOICE -s $RATE -p $PITCH $PUNCT -q --stdin --pho | mbrola -v $VOLUME -e /usr/share/mbrola/voices/$VOICE - -.au | $PLAY_COMMAND\"\n```\n\nWe can see, that the given data will be passed by echo command, then trsmitted to espeak then to mbrola and the player.\n\nTo use diacritizer as wrapper, We will replace echo command by our wrapper\n\nOur wrapper command  is\n\n```\npython2 mishkal-master/bin/mishkal-console.py\n```\n\nThe resulted configuration will be as\n\n```\n# adding mishkal\nGenericExecuteSynth \\\n\"python2 mishkal-master/bin/mishkal-console.py \\'$DATA\\'| espeak -v mb-$VOICE -s $RATE -p $PITCH $PUNCT -q --stdin --pho | mbrola -v $VOLUME -e /usr/share/mbrola/voices/$VOICE - -.au | $PLAY_COMMAND \"# adding mishkal\n```\n\nNow, text pass by diacritizer before going to TTS.\n\nRestart speech-dispatcher and in your client, select `espeak-mbrola-generic` as your output module, or test it with the following command\n\nNow test it with Arabic\n\n```\nspd-say -o espeak-mbrola-generic -l ar \"السلام عليكم\"\n```\n\nIn order to detect errors  you can run speech-dispatcher with debug level\n\n```\nspeech-dispatcher -l 4\n[Tue Dec  5 15:51:06 2017 : 74036] speechd: Speech Dispatcher 0.8.3 starting\n[Tue Dec  5 15:51:06 2017 : 74143] speechd:    Trying to find /run/user/1000/speech-dispatcher\n[Tue Dec  5 15:51:06 2017 : 74186] speechd:    Using directory: /run/user/1000/speech-dispatcher for pidfile and logging\n[Tue Dec  5 15:51:06 2017 : 74251] speechd: Speech Dispatcher already running.\n\nSpeech Dispatcher already running.\n```\n\nLike this, you can find errors in /run/user/1000/speech-dispatcher directory .\n\nIf all thing work well, you can test now your screen reader.\n\n\n\n## Supported by \n\n[![](/assets/bg-topo.jpg)](http://f123.org) \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxscout%2Fmintiq-raspberry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxscout%2Fmintiq-raspberry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxscout%2Fmintiq-raspberry/lists"}