Skip to content

Commit

Permalink
Small fixes to map_sample_repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
liPatrick committed Sep 13, 2024
1 parent 7c690da commit 050f54a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ultravox/tools/ds_tool/ds_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ def _map_sample_repeat(self, sample):
raise ValueError(f"Unsupported audio format: {type(audio)}")

repeated_audio = np.tile(audio_data, self.multiplier)
repeated_sentence = " ".join(sentence)
repeated_translation = " ".join(translation)
repeated_sentence = " ".join([sentence] * self.multiplier)
repeated_translation = " ".join([translation] * self.multiplier)
sample[self.audio_column_name]["array"] = repeated_audio
sample[self.audio_column_name].pop("path")
sample[self.asr_column_name] = repeated_sentence
Expand Down Expand Up @@ -398,7 +398,7 @@ def process_and_upload_split_rescursive(
failed_chunk_ranges.append((chunk_start, chunk_end))
successful_chunks = self.args.num_chunks - len(failed_chunk_ranges)
print(
f"Finished processing and uploading {successful_chunks}/{self.args.num_chunks} chunks for range [{start_index}, {end_index})"
f"Finished processing and uploading {successful_chunks}/{total_chunks} chunks for range [{start_index}, {end_index})"
)
if len(failed_chunk_ranges) > 0:
for start, end in failed_chunk_ranges:
Expand Down

0 comments on commit 050f54a

Please sign in to comment.