def _split_audio_by_duration(self, audio_abs_path,<EOL>results_abs_path, duration_seconds):
total_seconds = self._get_audio_duration_seconds(audio_abs_path)<EOL>current_segment = <NUM_LIT:0><EOL>while current_segment <= total_seconds // duration_seconds + <NUM_LIT:1>:<EOL><INDENT>if current_segment + duration_seconds > total_seconds:<EOL><INDENT>ending_second = total_seconds<EOL><DEDENT>else:<EOL><INDENT>ending_second = current_segment + duration_seconds<EOL><DEDENT>self._audio_segment_extractor(<EOL>audio_abs_path,<EOL>results_abs_path.replace("<STR_LIT:*>", "<STR_LIT>".format(<EOL>current_segment)),<EOL>starting_second=current_segment, duration=(ending_second -<EOL>current_segment))<EOL>current_segment += <NUM_LIT:1><EOL><DEDENT>
Calculates the length of each segment and passes it to
self._audio_segment_extractor

Parameters
----------
audio_abs_path : str
results_abs_path : str
    A place for adding digits needs to be added prior the the format
    decleration i.e. name%03.wav. Here, we've added `*` at staging
    step, which we'll replace.
duration_seconds : int