Skip to content

Commit

Permalink
Add align2phonemeids
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hansen committed Mar 25, 2021
1 parent 377a09b commit a489e19
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions bin/align2phonemeids
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e

lang="$1"
jsonl="$2"

if [[ -z "${jsonl}" ]]; then
echo 'Usage: align2phonemeids <LANG> <JSONL>' >&2
exit 1
fi

shift 2

if [[ -n "$(which gruut)" ]]; then
gruut='gruut'
else
this_dir="$( cd "$( dirname "$0" )" && pwd )"
gruut="${this_dir}/gruut"
fi

"${gruut}" "${lang}" phonemes2ids \
--pronunciation-key 'ipa' \
--single-pronunciation \
--csv \
< "${jsonl}"

0 comments on commit a489e19

Please sign in to comment.