Skip to content

Commit

Permalink
adding xlsx as output file type
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-roethig-db committed May 20, 2024
1 parent e0a2a96 commit 33f38f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion amondin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from pathlib import Path
import pandas as pd
import torchaudio

from amondin.tools import convert_audio_to_wav
from amondin.segment_speakers import segment_speakers
Expand Down Expand Up @@ -43,9 +44,13 @@ def transcribe(
input_file_path = f"{file_name}.wav"
print(f"Created {input_file_path}")

waveform, sample_rate = torchaudio.load("audio.wav")

audio = {"waveform": waveform, "sample_rate": sample_rate}

print("Segmenting speakers...")
speaker_segments = segment_speakers(
input_file_path,
audio,
hf_token=hf_token,
num_speakers=num_speakers,
device=device
Expand Down

0 comments on commit 33f38f9

Please sign in to comment.