ForwardTacotron is a model for the text-to-speech task originally trained in PyTorch* then converted to ONNX* format. The model was trained on LJSpeech dataset. ForwardTacotron performs mel-spectrogram regression from text. For details see paper, paper, repository.
We provide pre-trained models in ONNX format for user convenience.
Model is provided in ONNX format, which was obtained by the following steps.
- Clone the original repository
git clone https://github.com/as-ideas/ForwardTacotron
cd ForwardTacotron
- Checkout the commit that the conversion was tested on:
git checkout 78789c1aa845057bb2f799e702b1be76bf7defd0
- Follow README.md and train ForwardTacotron model.
- Copy provided script
forward_to_onnx.py
to ForwardTacotron root directory. - Run provided script for conversion ForwardTacotron to onnx format
python3 forward_to_onnx.py --tts_weights checkpoints/ljspeech_tts.forward/fast_speech_step<iteration>K_weights.pyt
Notes:
- Since ONNX doesn't support the build_index operation from PyTorch pipeline, the model is divided into two parts:
forward_tacotron_duration_prediction.onnx, forward_tacotron_regression.onnx
. - We stopped training of the Tacotron model in 183K iteration for alignment generation and stopped ForwardTacotron training in 290K iteration.
Metric | Value |
---|---|
Source framework | PyTorch* |
Subjective
The forward-tacotron-duration-prediction model accepts preprocessed text (see text_to_sequence in repository) and produces processed embeddings and duration in time for every processed embedding.
Metric | Value |
---|---|
GOPs | 6.66 |
MParams | 13.81 |
Sequence, name: input_seq
, shape: 1, 241
, format: B, C
, where:
B
- batch sizeC
- number of symbols in sequence (letters or phonemes)
-
Duration for input symbols, name:
duration
, shape:1, 241, 1
, formatB, C, H
. Contains predicted duration for each of the symbol in sequence.B
- batch sizeC
- number of symbols in sequence (letters or phonemes)H
- empty dimension
-
Processed embeddings, name:
embeddings
, shape:1, 241, 512
, formatB, C, H
. Contains processed embeddings for each symbol in sequence.B
- batch sizeC
- number of symbols in sequence (letters or phonemes)H
- height of the intermediate feature map
The forward-tacotron-regression model accepts aligned by duration processed embeddings (for example: if duration is [2, 3] and processed embeddings is [[1, 2], [3, 4]], aligned embeddings is [[1, 2], [1, 2], [1,2], [3, 4], [3, 4]]) and produces mel-spectrogram.
Metric | Value |
---|---|
GOPs | 4.91 |
MParams | 3.05 |
Processed embeddings aligned by durations, name: data
, shape: 1, 805, 512
, format: B, T, C
, where:
B
- batch sizeT
- time in mel-spectrogramC
- processed embedding dimension
Mel-spectrogram, name: mel
, shape: 80, 805
, format: C, T
, where:
T
- time in mel-spectrogramC
- number of mels in mel-spectrogram
You can download models and if necessary convert them into OpenVINO™ IR format using the Model Downloader and other automation tools as shown in the examples below.
An example of using the Model Downloader:
omz_downloader --name <model_name>
An example of using the Model Converter:
omz_converter --name <model_name>
The model can be used in the following demos provided by the Open Model Zoo to show its capabilities:
The original model is distributed under the following license:
MIT License
Copyright (c) 2020 Axel Springer AI. All rights reserved.
Copyright (c) 2019 fatchord (https://github.com/fatchord)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.