Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-roethig-db committed May 18, 2024
1 parent baf0658 commit 0f6b41c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ dmypy.json


data/
secrets.yaml
*secrets.yaml
*.csv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Simple Transcription tool using Huggigface models.
Simple Transcription tool using Huggingface models.
2 changes: 1 addition & 1 deletion amondin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .diarize_speakers import diarize_speakers
from .speech2text import speech2text
from .tools import get_secret, convert_audio_to_wav
from .transcription_tool import transcribe
from .main import transcribe
7 changes: 4 additions & 3 deletions amondin/transcription_tool.py → amondin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@


def transcribe(
file_path: str, hf_token: str, language: str = "german", num_speakers: int = None,
input_file_path: str, output_file_path: str, hf_token: str, language: str = "german", num_speakers: int = None,
s2t_model: str = "openai/whisper-tiny"
):
"""
Transcribe a give audio.wav file.
:param file_path:
:param output_file_path:
:param input_file_path:
:param hf_token:
:param language: Set the language for improved performance. None results in language detection.
:param num_speakers: Set the number of speakers for improved performance. None results in
Expand All @@ -24,7 +25,7 @@ def transcribe(
"""
print("Diarizing speakers...")
diarized_speakers = diarize_speakers(
file_path,
input_file_path,
hf_token=hf_token,
num_speakers=num_speakers,
)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"pyannote.core==5.0.0",
"pyyaml==6.0.1",
"ffmpeg-python==0.2.0",
"pandas==2.2.2",
"pandas==2.2.1",
"librosa==0.10.1",
"soundfile==0.12.1",
"numpy==1.26.4",
"torch==2.2.2",
"torch==2.2.1",
]
)

0 comments on commit 0f6b41c

Please sign in to comment.