Last active
January 23, 2018 06:30
-
-
Save pasindud/4408040f9727bc6c125d98e97be361b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| # Copyright 2017 Google, Inc. | |
| set -x | |
| set -e | |
| # Remove inbuilt langauge resources and download new one. | |
| cd /usr/local/src/ | |
| rm -rf language-resources | |
| git clone https://github.com/googlei18n/language-resources | |
| # Untar the wav files. | |
| mkdir -p /usr/local/src/voice/data/festvox/wavs | |
| cd /usr/local/src/voice/data/festvox/wavs | |
| if [[ -f ../wav.tar ]]; then | |
| tar -xf ../wav.tar | |
| fi | |
| # Debug information. | |
| cd /usr/local/src/voice/data/festvox/ | |
| echo "List of data" | |
| find . | |
| echo "$(pwd)" | |
| # Setup festival | |
| cd /usr/local/src/voice | |
| mkdir training | |
| /usr/local/src/language-resources/festival_utils/build_festvox_voice.sh -t \ | |
| /usr/local/src/voice/data/festvox/wavs/ \ | |
| data \ | |
| /usr/local/src/voice/training | |
| find . | |
| # Generate utts, initial labels and alignments | |
| cd /usr/local/src/voice/training | |
| ./bin/do_build parallel build_prompts | |
| ./bin/do_build label | |
| ./bin/do_clustergen parallel build_utts | |
| cd lab && ls *.lab -1 | sed -e 's/\.lab$//' | head -n 30 > ../file_id_list.scp | |
| # Setup merlin | |
| cd /usr/local/src/voice/training | |
| /usr/local/src/language-resources/festival_utils/run_docker_merlin_training.sh | |
| # Package the voice | |
| cd /usr/local/src/voice/data/festvox | |
| tar --absolute-names -zcvf built-voice.tar.gz /usr/local/src/merlin/egs/locale /usr/local/src/voice/training |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment