autogen_ext.agents.video_surfer.tools#
- extract_audio(video_path: str, audio_output_path: str) str[源]#
从视频文件中提取音频并将其保存为 MP3 文件。
- 参数:
video_path – 视频文件的路径。
audio_output_path – 保存提取的音频文件的路径。
- 返回:
确认消息,包含保存的音频文件的路径。
- transcribe_audio_with_timestamps(audio_path: str) str[源]#
使用 Whisper 模型转录带时间戳的音频文件。
- 参数:
audio_path – 音频文件的路径。
- 返回:
带时间戳的转录文本。
- save_screenshot(video_path: str, timestamp: float, output_path: str) None[源]#
在指定时间戳捕获屏幕截图并将其保存到输出路径。
- 参数:
video_path – 视频文件的路径。
timestamp – 时间戳,单位为秒。
output_path – 保存屏幕截图的路径。文件格式由路径中的扩展名决定。