mirror of
https://github.com/SWivid/F5-TTS.git
synced 2026-01-13 21:47:14 -08:00
fix rel path for pip pkg usage
This commit is contained in:
@@ -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."
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user