Installing other languages for transcription using pocketsphinx

OS: macOS Monterey 12.4 for development, Windows 10 for data collection
PsychoPy version: v2022.2.4

What are you trying to achieve?: Install the German language model for pocketsphinx located here.

What did you try to make it work?:

  1. Downloaded files
  2. Extracted cmusphinx-de-voxforge-5.2.tar.gz
  3. Copied files in “model_parameters/voxforge.cd_cont_6000” to “/Applications/”
  4. Copied “etc/voxforge.lm.bin” and “etc/voxforge.dic” to “/Applications/”
  5. Renamed “voxforge.lm.bin” to “de-de.lm.bin” to match the corresponding en-US file name
  6. Renamed “voxforge.dic” to “cmudict-de-de.dict” to match the corresponding en-US file name
  7. Changed language parameter in call to from “en-US” to “de-DE”
  8. Ran test experiment with microphone response component and built-in transcription enabled

What specifically went wrong when you tried that?:

Audio files are saved with the recorded input (mic access is not an issue), but no transcription output in the data file. No error occurs, although I suspect this might be related to the fix described in this post.

I’m not sure if I copied the correct files, if how I renamed the files might be an issue, or if using “de-DE” actually switches to the new model. This doc is the best advice I’ve found so far, but it’s not specific to psychopy.

Everything works as expected if “en-US” is used as the language… Has anyone succeeded in installing another language for pocketsphinx that worked with psychopy? Many thanks for any help!