4moha commited on
Commit
0928c49
·
verified ·
1 Parent(s): f908bea

Add train_narrator_tts.py

Browse files
Files changed (1) hide show
  1. train_narrator_tts.py +11 -0
train_narrator_tts.py CHANGED
@@ -214,6 +214,17 @@ def push_model(ckpt_dir: Path) -> None:
214
 
215
 
216
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
 
 
 
217
  prepare_data()
218
  ckpt_dir = fine_tune()
219
  push_model(ckpt_dir)
 
214
 
215
 
216
  if __name__ == "__main__":
217
+ # torchcodec (datasets audio decoder) needs FFmpeg system libs — install before training
218
+ print("Installing FFmpeg for torchcodec audio decoding...")
219
+ r = subprocess.run(
220
+ ["apt-get", "install", "-y", "--no-install-recommends", "ffmpeg"],
221
+ capture_output=True, text=True,
222
+ )
223
+ if r.returncode == 0:
224
+ print("FFmpeg installed OK")
225
+ else:
226
+ print(f"apt-get failed (rc={r.returncode}): {r.stderr[-300:]}")
227
+
228
  prepare_data()
229
  ckpt_dir = fine_tune()
230
  push_model(ckpt_dir)