Skip to content

Commit

Permalink
Update most profiles to 1.1 or 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hansen committed May 6, 2020
1 parent 99811c4 commit 772faf7
Show file tree
Hide file tree
Showing 25 changed files with 74 additions and 26 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Speech models and supporting files for [voice2json](https://github.com/synesthes

Files are contained in `<LANGUAGE>/<LOCALE>` directories. Each locale directory should contain a `SOURCE` file describing where it was sourced from. The `LICENSE` file in each locale directory covers the artifacts for that specific profile.

Directories with `pocketsphinx` contain [CMU Sphinx](https://cmusphinx.github.io/) acoustic models. Directories with `kaldi` contain [Kaldi](https://kaldi-asr.org) acoustic models (either `gmm` or `nnet3`).
* Directories with `pocketsphinx` contain [CMU Sphinx](https://cmusphinx.github.io/) acoustic models
* Directories with `kaldi` contain [Kaldi](https://kaldi-asr.org) acoustic models (either `gmm` or `nnet3`).
* Directories with `deepspeech` contain [Mozilla DeepSpeech](https://github.com/mozilla/DeepSpeech) acoustic models (version 0.6).
* Directories with `julius` contain [Julius](https://github.com/julius-speech/julius) acoustic models (DNN, version 4.5).

Some files are split into multiple parts so that they can be uploaded to GitHub. This is done with the `split` command:

Expand Down
49 changes: 47 additions & 2 deletions bin/generate-reports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,41 @@ if [[ -z "${profiles[*]}" ]]; then
done < "${src_dir}/PROFILES"
fi

# -----------------------------------------------------------------------------
# Download Profile
# -----------------------------------------------------------------------------

function download_profile {
profile_name="$1"
profile_dir="$2"

echo $profile_name

voice2json print-downloads \
--with-examples \
--no-mixed-language-model \
--url-format 'http://localhost:5000/{profile}/raw/master/{file}' \
"${profile_name}" | \
while read -r json; do
# Source URL
url="$(echo "${json}" | jq --raw-output .url)"

# Destination directory and file path
dest_file="$(echo "${json}" | jq --raw-output .file)"
dest_file="${profile_dir}/${dest_file}"

# Directory of destination file
dest_dir="$(dirname "${dest_file}")"

echo "${url} => ${dest_file}"
# Create destination directory and download file
mkdir -p "${dest_dir}"
curl -sSfL -o "${dest_file}" "${url}"
done
}

# -----------------------------------------------------------------------------
# Generate Report
# -----------------------------------------------------------------------------

for profile in "${profiles[@]}"; do
Expand All @@ -39,19 +74,27 @@ for profile in "${profiles[@]}"; do
rm -rf "${dest_dir}"
mkdir -p "${dest_dir}"

echo 'Copying...'
cp -aR "${src_dir}/${profile}"/* "${dest_dir}/"
echo 'Downloading...'
download_profile "$(basename "${profile}")" "${dest_dir}"

echo 'Training...'
voice2json -p "${dest_dir}" --debug train-profile

# Manually copy test files
test_wav_dir="${src_dir}/${profile}/test"
if [[ -d "${test_wav_dir}" ]]; then
cp -aR "${test_wav_dir}" "${dest_dir}/"
fi

closed_dir="${dest_dir}/test/closed"
if [[ -d "${closed_dir}" ]]; then
echo 'Testing (closed)...'
voice2json -p "${dest_dir}" --debug test-examples --directory "${closed_dir}" | \
jq . > "${closed_dir}/report.json"

cp "${closed_dir}/report.json" "${src_dir}/${profile}/test/closed/"
else
echo "${closed_dir}" does not exist
fi

open_dir="${dest_dir}/test/open"
Expand All @@ -68,6 +111,8 @@ for profile in "${profiles[@]}"; do
jq . > "${open_dir}/${report_name}"

cp "${open_dir}/report.json" "${src_dir}/${profile}/test/open/"
else
echo "${open_dir}" does not exist
fi

echo 'Done'
Expand Down
2 changes: 1 addition & 1 deletion catalan/ca-es_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion dutch/nl_kaldi-cgn
2 changes: 1 addition & 1 deletion dutch/nl_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion english/en-in_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion english/en-us_deepspeech-mozilla
2 changes: 1 addition & 1 deletion english/en-us_julius-github
2 changes: 1 addition & 1 deletion english/en-us_kaldi-zamia
2 changes: 1 addition & 1 deletion english/en-us_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion french/fr_kaldi-guyot
2 changes: 1 addition & 1 deletion french/fr_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion german/de_kaldi-zamia
2 changes: 1 addition & 1 deletion german/de_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion hindi/hi_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion kazakh/kz_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion mandarin/zh-cn_pocketsphinx-cmu
2 changes: 1 addition & 1 deletion spanish/es-mexican_pocketsphinx-cmu
Submodule es-mexican_pocketsphinx-cmu updated 48 files
+15 −0 files.yml
+5 −0 profile.yml
+29 −0 slot_programs/rhasspy/number
+1 −0 test/closed
+1 −0 test/open
+15 −0 test/voxforge/LICENSE
+10 −0 test/voxforge/PROMPTS
+24 −0 test/voxforge/README
+1 −0 test/voxforge/es-0027.txt
+ test/voxforge/es-0027.wav
+1 −0 test/voxforge/es-0028.txt
+ test/voxforge/es-0028.wav
+1 −0 test/voxforge/es-0029.txt
+ test/voxforge/es-0029.wav
+1 −0 test/voxforge/es-0030.txt
+ test/voxforge/es-0030.wav
+1 −0 test/voxforge/es-0031.txt
+ test/voxforge/es-0031.wav
+1 −0 test/voxforge/es-0032.txt
+ test/voxforge/es-0032.wav
+1 −0 test/voxforge/es-0033.txt
+ test/voxforge/es-0033.wav
+1 −0 test/voxforge/es-0034.txt
+ test/voxforge/es-0034.wav
+1 −0 test/voxforge/es-0035.txt
+ test/voxforge/es-0035.wav
+1 −0 test/voxforge/es-0036.txt
+ test/voxforge/es-0036.wav
+1,041 −0 test/voxforge/report.json
+1 −0 test/wavenet/apagar_la_luz_del_garaje.txt
+ test/wavenet/apagar_la_luz_del_garaje.wav
+1 −0 test/wavenet/apagar_la_lámpara_de_la_sala_de_estar.txt
+ test/wavenet/apagar_la_lámpara_de_la_sala_de_estar.wav
+1 −0 test/wavenet/cuál_es_la_temperatura.txt
+ test/wavenet/cuál_es_la_temperatura.wav
+1 −0 test/wavenet/encender_la_luz_del_garaje.txt
+ test/wavenet/encender_la_luz_del_garaje.wav
+1 −0 test/wavenet/enciende_la_lámpara_de_la_sala.txt
+ test/wavenet/enciende_la_lámpara_de_la_sala.wav
+1 −0 test/wavenet/está_abierta_la_puerta_del_garaje.txt
+ test/wavenet/está_abierta_la_puerta_del_garaje.wav
+1 −0 test/wavenet/está_cerrada_la_puerta_del_garaje.txt
+ test/wavenet/está_cerrada_la_puerta_del_garaje.wav
+1 −0 test/wavenet/que_calor_hace.txt
+ test/wavenet/que_calor_hace.wav
+1 −0 test/wavenet/que_tan_frio_esta.txt
+ test/wavenet/que_tan_frio_esta.wav
+798 −0 test/wavenet/report.json
2 changes: 1 addition & 1 deletion spanish/es_pocketsphinx-cmu

0 comments on commit 772faf7

Please sign in to comment.