By default, PocketSphinx in SpeechRecognition only supports US English (en-US). To use other languages like French (fr-FR), Mandarin Chinese (zh-CN), or Italian (it-IT), you must download their language pack ZIP archives and extract them directly into the speech_recognition module install directory.
You can find your module install directory by running:
python -c "import speech_recognition as sr, os.path as p; print(p.dirname(sr.__file__))"
Once extracted, you can use the language by passing the IETF language tag to the language parameter of recognizer_instance.recognize_sphinx().
#!/usr/bin/env bash
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/pocketsphinx-data/fr-FR/"
sudo unzip -o zh-CN.zip -d "$SR_LIB"
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/pocketsphinx-data/it-IT/"