This file contains 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
# Copyright 2025 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
import tensorflow_datasets as tfds | |
from flax.training.train_state import TrainState | |
import flax.linen as nn | |
import jax | |
import jax.numpy as jnp | |
import matplotlib.pyplot as plt | |
import optax | |
from tqdm import tqdm |
This file contains 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
34c34 | |
< data_url=www.openslr.org/resources/60 | |
--- | |
> data_url=www.openslr.org/resources/141 | |
69c69 | |
< cp ${db_root}/LibriTTS/SPEAKERS.txt data/local | |
--- | |
> cp ${db_root}/LibriTTS/train-clean-100/SPEAKERS.txt data/local |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
git clone https://github.com/espnet/espnet | |
cd espnet | |
git checkout v.0.9.7 | |
# Prepare TTS input | |
echo "HELLO WORLD" > egs/ljspeech/tts1/text | |
# Run TTS in docker. If you have GPUs, use "espnet/espnet:gpu-cuda10.1-cudnn7-u18" | |
# https://hub.docker.com/r/espnet/espnet/tags | |
docker run --rm -v $(pwd)/utils:/espnet/utils -v $(pwd)/espnet:/espnet/espnet -v $(pwd)/egs:/espnet/egs \ |
This file contains 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
# Count the number of parameters in the saved model. | |
import torch | |
# Run this commands to get this model. | |
# $ cd $ESPNET_ROOT/egs/mini_an4/asr1; ./run.sh | |
state = torch.load("./exp/train_nodev_pytorch_train/results/model.acc.best") | |
print(sum(v.numel() for v in state.values())) |
This file contains 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
210c210 | |
< print B "( " . $cmd . ") 2>>$logfile >> $logfile"; | |
--- | |
> print B "( " . $cmd . ") |& tee -a $logfile"; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | |
# Copyright 2019 Nagoya University (Masao Someki) | |
# Copyright 2019 Shigeki Karita | |
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | |
. ./path.sh || exit 1; | |
. ./cmd.sh || exit 1; | |
# general configuration |
This file contains 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
import logging | |
from typing import Dict | |
from typing import NamedTuple | |
from typing import Tuple | |
import torch | |
from espnet.nets.e2e_asr_common import end_detect | |
from espnet.nets.scorer_interface import PartialScorerInterface | |
from espnet.nets.scorer_interface import ScorerInterface |
This file contains 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
import logging | |
from typing import Any | |
from typing import Dict | |
from typing import List | |
from typing import NamedTuple | |
from typing import Tuple | |
import torch | |
from espnet.nets.e2e_asr_common import end_detect |
NewerOlder