mirror of
https://github.com/pstrueb/piper.git
synced 2026-04-17 22:05:30 +00:00
Add extra options to infer script
This commit is contained in:
@@ -24,6 +24,11 @@ def main():
|
|||||||
)
|
)
|
||||||
parser.add_argument("--output-dir", required=True, help="Path to write WAV files")
|
parser.add_argument("--output-dir", required=True, help="Path to write WAV files")
|
||||||
parser.add_argument("--sample-rate", type=int, default=22050)
|
parser.add_argument("--sample-rate", type=int, default=22050)
|
||||||
|
#
|
||||||
|
parser.add_argument("--noise-scale", type=float, default=0.667)
|
||||||
|
parser.add_argument("--length-scale", type=float, default=1.0)
|
||||||
|
parser.add_argument("--noise-w", type=float, default=0.8)
|
||||||
|
#
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
args.output_dir = Path(args.output_dir)
|
args.output_dir = Path(args.output_dir)
|
||||||
@@ -49,7 +54,7 @@ def main():
|
|||||||
|
|
||||||
text = torch.LongTensor(phoneme_ids).unsqueeze(0)
|
text = torch.LongTensor(phoneme_ids).unsqueeze(0)
|
||||||
text_lengths = torch.LongTensor([len(phoneme_ids)])
|
text_lengths = torch.LongTensor([len(phoneme_ids)])
|
||||||
scales = [0.667, 1.0, 0.8]
|
scales = [args.noise_scale, args.length_scale, args.noise_w]
|
||||||
sid = torch.LongTensor([speaker_id]) if speaker_id is not None else None
|
sid = torch.LongTensor([speaker_id]) if speaker_id is not None else None
|
||||||
|
|
||||||
start_time = time.perf_counter()
|
start_time = time.perf_counter()
|
||||||
|
|||||||
Reference in New Issue
Block a user