movis.contrib.voicevox.make_voicevox_dataframe#

movis.contrib.voicevox.make_voicevox_dataframe(audio_dir: str | PathLike) DataFrame[source]#

Create a pandas.DataFrame representing the timeline of audio files generated by Voicevox.

This function takes a directory containing .wav files generated by Voicevox, and returns a DataFrame where each row represents an audio file, sorted by the filename. The DataFrame will have columns start_time, end_time, and audio_file.

Args:
audio_dir:

The directory containing .wav files generated by Voicevox.

Returns:

A DataFrame with columns start_time, end_time, and audio_file.

  • start_time: The start time of the audio clip in seconds.

  • end_time: The end time of the audio clip in seconds.

  • audio_file: The path to the audio file.

Example:
>>> from movis.contrib.voicevox import make_voicevox_dataframe
>>> make_voicevox_dataframe('audio')
start_time   end_time                   audio_file
0    0.000000   4.682667  audio/001_ずんだもん(ノーマル).wav
1    4.682667   8.202667    audio/002_四国めたん(ノーマル).wav
2    8.202667  13.930667  audio/003_ずんだもん(ノーマル).wav
3   13.930667  18.133333    audio/004_四国めたん(ノーマル).wav
4   18.133333  20.138667    audio/005_四国めたん(ノーマル).wav
5   20.138667  25.205333  audio/007_ずんだもん(ノーマル).wav
6   25.205333  30.410667  audio/008_ずんだもん(ノーマル).wav