File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -928,6 +928,24 @@ if [ $targetSystem = raspi ] ; then
928
928
sudo bash $INSTALLERDIR /raspi/access_point/wap.sh
929
929
fi
930
930
931
+ read -p " Do you want to download languages for offline recognition?[Y/N] " -n 1 -r
932
+ echo # (optional) move to a new line
933
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
934
+ SR_LIB=$( python3 -c " import speech_recognition as sr, os.path as p; print(p.dirname(sr.__file__))" )
935
+ sudo mkdir " $SR_LIB /it-IT"
936
+ sudo mkdir " $SR_LIB /temp"
937
+ echo " Downloading Italian Language"
938
+ sudo wget -O " $SR_LIB /temp/it-IT.tar.gz" ' https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/Italian/cmusphinx-it-5.2.tar.gz/download'
939
+ sudo tar -zxf " $SR_LIB /temp/it-IT.tar.gz" --directory " $SR_LIB /temp"
940
+ sudo mv " $SR_LIB /temp/cmusphinx-it-5.2/etc/voxforge_it_sphinx.lm" " $SR_LIB /temp/cmusphinx-it-5.2/etc/italian.lm"
941
+ sudo sphinx_lm_convert -i " $SR_LIB /temp/cmusphinx-it-5.2/etc/italian.lm" -o " $SR_LIB /temp/cmusphinx-it-5.2/etc/italian.lm.bin"
942
+ sudo mv " $SR_LIB /temp/cmusphinx-it-5.2/etc/italian.lm" " $SR_LIB /it-IT/italian.lm"
943
+ sudo mv " $SR_LIB /temp/cmusphinx-it-5.2/etc/italian.lm.bin" " $SR_LIB /it-IT/italian.lm.bin"
944
+ sudo mv " $SR_LIB /temp/cmusphinx-it-5.2/etc/voxforge_it_sphinx.dic" " $SR_LIB /it-IT/pronounciation-dictionary.dic"
945
+ sudo mv -v " $SR_LIB /temp/cmusphinx-it-5.2/model_parameters/voxforge_it_sphinx.cd_cont_2000/" " $SR_LIB /it-IT/acoustic-model/"
946
+ sudo rm -rf " $SR_LIB /temp"
947
+
948
+ fi
931
949
932
950
#
933
951
# Final output
You can’t perform that action at this time.
0 commit comments