| """Run the standalone public DuDE release.""" | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| from dude_tts import DuDE | |
| if __name__ == '__main__': | |
| p = argparse.ArgumentParser(description=__doc__) | |
| p.add_argument('--model', default='penguinfish1688/duplexdataengine') | |
| p.add_argument('--xml', required=True, help='Path to a dialogue XML file') | |
| p.add_argument('--voice-a', default='voice_1', help='Speaker A reference audio path or included voice name') | |
| p.add_argument('--voice-b', default='voice_2', help='Speaker B reference audio path or included voice name') | |
| p.add_argument('--output', default='duplex.wav') | |
| p.add_argument('--seed', type=int, default=20260922) | |
| p.add_argument('--max-seconds', type=float, default=150.) | |
| p.add_argument('--device', default='cuda') | |
| args = p.parse_args() | |
| model = DuDE.from_pretrained(args.model, device=args.device) | |
| result = model.generate(Path(args.xml).read_text(), args.voice_a, args.voice_b, | |
| seed=args.seed, max_seconds=args.max_seconds) | |
| result.save(args.output) | |
| print(json.dumps(dict(output=str(Path(args.output).resolve()), sample_rate=result.sample_rate, | |
| eos=result.eos, frames=result.frames))) | |
Xet Storage Details
- Size:
- 1.25 kB
- Xet hash:
- ae9386480629737f5ecc7ebad2a9a493c4d445a6efcb9c2d13c0e0669d985b81
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.