Skip to content

Commit

Permalink
Merge branch 'houssem_speaker_identify_optim' of https://github.com/l…
Browse files Browse the repository at this point in the history
…into-ai/linto-diarization into houssem_speaker_identify_optim
  • Loading branch information
htagourti committed Nov 18, 2024
2 parents 3b2c1fb + d2000b9 commit e937e2f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions http_server/ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import json
import logging
from time import time
import os

from confparser import createParser
from flask import Flask, Response, abort, json, request
Expand All @@ -12,7 +11,6 @@

from diarization.processing import diarizationworker, USE_GPU


app = Flask("__diarization-serving__")

logging.basicConfig(
Expand Down
2 changes: 1 addition & 1 deletion pyannote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Diarization worker accepts requests with the following arguments:
* `file`: (str) Is the relative path of the file in the shared_folder.
* `speaker_count`: (int, default None) Fixed number of speakers.
* `max_speaker`: (int, default None) Max number of speaker if speaker_count=None.
* `speaker_names`: (string, optional) List of target speaker names, speaker identification (if speaker samples are provided only). Possible values are
* `speaker_names`: (string, default None) List of target speaker names, speaker identification (if speaker samples are provided only). Possible values are
* empty string "": no speaker identification
* wild card "`*`": speaker identification for all speakers
* list of speaker names in json format (ex: "`["speaker1", ..., "speakerN"]`") or separated by `|` (ex: "`speaker1|...|speakerN`"): speaker identification for the listed speakers only
Expand Down
1 change: 1 addition & 0 deletions pyannote/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 2.0.1
- Use Qdrant for efficient speaker identification
- Update pyannote to 3.3.2 (and speechbrain 1.0.0)

# 2.0.0
- Add speaker identification
Expand Down
2 changes: 1 addition & 1 deletion simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Diarization worker accepts requests with the following arguments:
* `file`: (str) Is the relative path of the file in the shared_folder.
* `speaker_count`: (int, default None) Fixed number of speakers.
* `max_speaker`: (int, default None) Max number of speaker if speaker_count=None.
* `speaker_names`: (string, optional) List of target speaker names, speaker identification (if speaker samples are provided only). Possible values are
* `speaker_names`: (string, default None) List of target speaker names, speaker identification (if speaker samples are provided only). Possible values are
* empty string "": no speaker identification
* wild card "`*`": speaker identification for all speakers
* list of speaker names in json format (ex: "`["speaker1", ..., "speakerN"]`") or separated by `|` (ex: "`speaker1|...|speakerN`"): speaker identification for the listed speakers only
Expand Down
1 change: 1 addition & 0 deletions simple/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 2.0.1
- Use Qdrant for efficient speaker identification
- Specifying max number of speakers is now optional

# 2.0.0
- Add speaker identification
Expand Down
4 changes: 3 additions & 1 deletion simple/diarization/processing/speakerdiarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import memory_tempfile
import torch
import werkzeug
import warnings

sys.path.append(os.path.join(os.path.dirname(__file__), "simple_diarizer"))
import simple_diarizer
Expand Down Expand Up @@ -210,7 +211,8 @@ def run(
self.log.info(f"Starting diarization on file {file_path}")

if speaker_count is None and max_speaker is None:
raise Exception("Either speaker_count or max_speaker must be set")
max_speaker = 50 # default value
warnings.warn(f"No speaker count nor maximum specified, using default value {max_speaker=}")

try:
result = self.run_simple_diarizer(
Expand Down

0 comments on commit e937e2f

Please sign in to comment.