Spaces:
Configuration error
Configuration error
atlonxp
commited on
Update get_random_sample_transcribe when absolute path is used in finetune_gradio.py
Browse filesUpdate `get_random_sample_transcribe` to handle absolute paths in `finetune_gradio.py`
- Added support for processing absolute file paths during transcription.
- Updated logic to correctly handle and return audio file paths with absolute URLs.
- Example use case: URLs like `https://localhost:55555/speech/150/150896/150-150896-40.wav.wav`.
- Correct one should be: `https://localhost:55555/speech/150/150896/150-150896-40.wav`.
src/f5_tts/train/finetune_gradio.py
CHANGED
@@ -1177,7 +1177,10 @@ def get_random_sample_transcribe(project_name):
|
|
1177 |
sp = item.split("|")
|
1178 |
if len(sp) != 2:
|
1179 |
continue
|
1180 |
-
|
|
|
|
|
|
|
1181 |
|
1182 |
if list_data == []:
|
1183 |
return "", None
|
|
|
1177 |
sp = item.split("|")
|
1178 |
if len(sp) != 2:
|
1179 |
continue
|
1180 |
+
|
1181 |
+
# fixed audio when it is absolute
|
1182 |
+
file_audio = get_correct_audio_path(sp[0], path_project)
|
1183 |
+
list_data.append([file_audio, sp[1]])
|
1184 |
|
1185 |
if list_data == []:
|
1186 |
return "", None
|