mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-07 08:04:18 +00:00
Update test_onnx.py
This commit is contained in:
parent
fefae1f8df
commit
64903abf77
@ -28,10 +28,11 @@ Use the onnx model to generate a wav:
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import onnxruntime as ort
|
import onnxruntime as ort
|
||||||
import torch
|
import torch
|
||||||
import torchaudio
|
import torchaudio
|
||||||
|
|
||||||
from tokenizer import Tokenizer
|
from tokenizer import Tokenizer
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +48,12 @@ def get_parser():
|
|||||||
help="Path to the onnx model.",
|
help="Path to the onnx model.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--speakers",
|
||||||
|
type=Path,
|
||||||
|
default=Path("data/speakers.txt"),
|
||||||
|
help="Path to speakers.txt file.",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--tokens",
|
"--tokens",
|
||||||
type=str,
|
type=str,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user