-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support English for MeloTTS models. (#1134)
- Loading branch information
1 parent
fa07bbc
commit 9548541
Showing
5 changed files
with
99 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ echo "pwd: $PWD" | |
|
||
ls -lh | ||
|
||
./show-info.py | ||
|
||
head lexicon.txt | ||
echo "---" | ||
tail lexicon.txt | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2024 Xiaomi Corp. (authors: Fangjun Kuang) | ||
|
||
import onnxruntime | ||
|
||
|
||
def show(filename): | ||
session_opts = onnxruntime.SessionOptions() | ||
session_opts.log_severity_level = 3 | ||
sess = onnxruntime.InferenceSession(filename, session_opts) | ||
for i in sess.get_inputs(): | ||
print(i) | ||
|
||
print("-----") | ||
|
||
for i in sess.get_outputs(): | ||
print(i) | ||
|
||
meta = sess.get_modelmeta().custom_metadata_map | ||
print("*****************************************") | ||
print("meta\n", meta) | ||
|
||
|
||
def main(): | ||
print("=========model==========") | ||
show("./model.onnx") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() | ||
|
||
""" | ||
=========model========== | ||
NodeArg(name='x', type='tensor(int64)', shape=['N', 'L']) | ||
NodeArg(name='x_lengths', type='tensor(int64)', shape=['N']) | ||
NodeArg(name='tones', type='tensor(int64)', shape=['N', 'L']) | ||
NodeArg(name='sid', type='tensor(int64)', shape=[1]) | ||
NodeArg(name='noise_scale', type='tensor(float)', shape=[1]) | ||
NodeArg(name='length_scale', type='tensor(float)', shape=[1]) | ||
NodeArg(name='noise_scale_w', type='tensor(float)', shape=[1]) | ||
----- | ||
NodeArg(name='y', type='tensor(float)', shape=['N', 'S', 'T']) | ||
***************************************** | ||
meta | ||
{'description': 'MeloTTS is a high-quality multi-lingual text-to-speech library by MyShell.ai', | ||
'model_type': 'melo-vits', 'license': 'MIT license', 'sample_rate': '44100', 'add_blank': '1', | ||
'n_speakers': '1', 'bert_dim': '1024', 'language': 'Chinese + English', | ||
'ja_bert_dim': '768', 'speaker_id': '1', 'comment': 'melo', 'lang_id': '3', | ||
'tone_start': '0', 'url': 'https://github.com/myshell-ai/MeloTTS'} | ||
""" |
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