From 43d4a679b73b6095bedab270cfeb5fcee4486a70 Mon Sep 17 00:00:00 2001 From: Fygul Hether Date: Sun, 11 Aug 2019 17:31:33 +0800 Subject: [PATCH] Update pocketsphinx.rst Those zip files contain 'pocketsphinx-data' sub-directory --- reference/pocketsphinx.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/pocketsphinx.rst b/reference/pocketsphinx.rst index e4c1bf34..a1ad55b1 100644 --- a/reference/pocketsphinx.rst +++ b/reference/pocketsphinx.rst @@ -20,11 +20,11 @@ Here is a simple Bash script to install all of them, assuming you've downloaded SR_LIB=$(python -c "import speech_recognition as sr, os.path as p; print(p.dirname(sr.__file__))") sudo apt-get install --yes unzip sudo unzip -o fr-FR.zip -d "$SR_LIB" - sudo chmod --recursive a+r "$SR_LIB/fr-FR/" + sudo chmod --recursive a+r "$SR_LIB/pocketsphinx-data/fr-FR/" sudo unzip -o zh-CN.zip -d "$SR_LIB" - sudo chmod --recursive a+r "$SR_LIB/zh-CN/" + sudo chmod --recursive a+r "$SR_LIB/pocketsphinx-data/zh-CN/" sudo unzip -o it-IT.zip -d "$SR_LIB" - sudo chmod --recursive a+r "$SR_LIB/it-IT/" + sudo chmod --recursive a+r "$SR_LIB/pocketsphinx-data/it-IT/" Once installed, you can simply specify the language using the ``language`` parameter of ``recognizer_instance.recognize_sphinx``. For example, French would be specified with ``"fr-FR"`` and Mandarin with ``"zh-CN"``.