(self)
| 82 | self.is_seko_talk_ar = config.get("model_cls") == "seko_talk_ar" |
| 83 | if self.is_seko_talk_ar: |
| 84 | self.latent_per_chunk = config["ar_config"]["num_frame_per_chunk"] |
| 85 | self.audio_window_secs = config.get("audio_window", 1.0) |
| 86 | self.look_ahead_secs = config.get("look_ahead", 0.0) |
| 87 | |
| 88 | def init_recorder(self): |
| 89 | if not self.output_video_path or self.rank != self.target_recorder_rank: |
| 90 | return |
| 91 | logger.info(f"Rank {self.rank} init recorder with: {self.output_video_path}") |
| 92 | whip_shared_path = os.getenv("WHIP_SHARED_LIB", None) |
| 93 | if whip_shared_path and self.output_video_path.startswith("http"): |
| 94 | from lightx2v.utils.va_recorder_x264 import X264VARecorder |
| 95 | |
| 96 | self.recorder = X264VARecorder( |
| 97 | whip_shared_path=whip_shared_path, |
| 98 | livestream_url=self.output_video_path, |
| 99 | fps=self.record_fps, |
| 100 | sample_rate=self.audio_sr, |
| 101 | slice_frame=self.slice_frame, |
| 102 | prev_frame=self.prev_frame_length, |
| 103 | ) |
| 104 | else: |
| 105 | from lightx2v.utils.va_recorder import VARecorder |
| 106 | |
| 107 | self.recorder = VARecorder( |
| 108 | livestream_url=self.output_video_path, |
| 109 | fps=self.record_fps, |
| 110 | sample_rate=self.audio_sr, |
| 111 | slice_frame=self.slice_frame, |
| 112 | prev_frame=self.prev_frame_length, |
| 113 | stream_config=self.stream_config, |
no test coverage detected