Skip to content

Commit

Permalink
Update .gitignore and cog.yaml, add print statements in predict.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmol committed Mar 14, 2024
1 parent 2f0198a commit d8c96da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
.cog
.vscode
__pycache__
.env
.env
models
10 changes: 5 additions & 5 deletions cog.yaml
Expand Up @@ -17,12 +17,12 @@ build:

# a list of packages in the format <package-name>==<version>
python_packages:
- "faster-whisper==1.0.1"
- "torch>=2.0.1"
- "torchtext>=0.15.2"
- "torch>=2.0.1+cu118"
- "requests"
- "pyannote.audio==3.1.1"
- "faster-whisper==0.10.1"
- "torchvision>=0.15.2"
- "requests>=2.28.2"
- "pyannote.audio>=3.1.1"
- "torchtext>=0.15.2"


# commands run after the environment is setup
Expand Down
5 changes: 5 additions & 0 deletions predict.py
Expand Up @@ -224,13 +224,16 @@ def speech_to_text(
f"Finished with transcribing, took {time_transcribing_end - time_start:.5} seconds"
)

print("Starting diarization")
diarization = self.diarization_model(audio_file_wav, num_speakers=num_speakers)

time_diraization_end = time.time()
print(
f"Finished with diarization, took {time_diraization_end - time_transcribing_end:.5} seconds"
)

print("Starting merging")

# Initialize variables to keep track of the current position in both lists
margin = 0.1 # 0.1 seconds margin

Expand Down Expand Up @@ -295,6 +298,8 @@ def speech_to_text(
print(
f"Finished with merging, took {time_merging_end - time_diraization_end:.5} seconds"
)

print("Starting cleaning")
segments = final_segments
# Make output
output = [] # Initialize an empty list for the output
Expand Down

0 comments on commit d8c96da

Please sign in to comment.