diff --git a/src/f5_tts/infer/examples/basic/basic.toml b/src/f5_tts/infer/examples/basic/basic.toml index cc3fbda..1871499 100644 --- a/src/f5_tts/infer/examples/basic/basic.toml +++ b/src/f5_tts/infer/examples/basic/basic.toml @@ -1,6 +1,6 @@ # F5-TTS | E2-TTS model = "F5-TTS" -ref_audio = "src/f5_tts/infer/examples/basic/basic_ref_en.wav" +ref_audio = "infer/examples/basic/basic_ref_en.wav" # If an empty "", transcribes the reference audio automatically. ref_text = "Some call me nature, others call me mother nature." gen_text = "I don't really care what you call me. I've been a silent spectator, watching species evolve, empires rise and fall. But always remember, I am mighty and enduring." diff --git a/src/f5_tts/infer/examples/multi/story.toml b/src/f5_tts/infer/examples/multi/story.toml index bdf4455..c637062 100644 --- a/src/f5_tts/infer/examples/multi/story.toml +++ b/src/f5_tts/infer/examples/multi/story.toml @@ -1,19 +1,19 @@ # F5-TTS | E2-TTS model = "F5-TTS" -ref_audio = "src/f5_tts/infer/examples/multi/main.flac" +ref_audio = "infer/examples/multi/main.flac" # If an empty "", transcribes the reference audio automatically. ref_text = "" gen_text = "" # File with text to generate. Ignores the text above. -gen_file = "src/f5_tts/infer/examples/multi/story.txt" +gen_file = "infer/examples/multi/story.txt" remove_silence = true output_dir = "tests" [voices.town] -ref_audio = "src/f5_tts/infer/examples/multi/town.flac" +ref_audio = "infer/examples/multi/town.flac" ref_text = "" [voices.country] -ref_audio = "src/f5_tts/infer/examples/multi/country.flac" +ref_audio = "infer/examples/multi/country.flac" ref_text = "" diff --git a/src/f5_tts/infer/infer_cli.py b/src/f5_tts/infer/infer_cli.py index d56408f..ebd538f 100644 --- a/src/f5_tts/infer/infer_cli.py +++ b/src/f5_tts/infer/infer_cli.py @@ -80,8 +80,8 @@ args = parser.parse_args() config = tomli.load(open(args.config, "rb")) ref_audio = args.ref_audio if args.ref_audio else config["ref_audio"] -if "src/f5_tts/infer/examples/basic" in ref_audio: # for pip pkg user - ref_audio = str(files("f5_tts").joinpath(f"../../{ref_audio}")) +if "infer/examples/" in ref_audio: # for pip pkg user + ref_audio = str(files("f5_tts").joinpath(f"{ref_audio}")) ref_text = args.ref_text if args.ref_text != "666" else config["ref_text"] gen_text = args.gen_text if args.gen_text else config["gen_text"] gen_file = args.gen_file if args.gen_file else config["gen_file"]