removed unnecessary stuff
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
from pyannote.audio import Pipeline
|
|
||||||
from whisper import Whisper, load_model
|
|
||||||
import os
|
import os
|
||||||
import glob
|
|
||||||
from warnings import warn
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
CACHE_DIR = os.getenv(
|
CACHE_DIR = os.getenv(
|
||||||
@@ -32,23 +28,9 @@ def config_diarization_yaml(file, path_to_segmentation = None):
|
|||||||
else:
|
else:
|
||||||
yml["pipeline"]["params"]["segmentation"] = os.path.join(PYANNOTE_DEFAULT_PATH, "pytorch_model.bin")
|
yml["pipeline"]["params"]["segmentation"] = os.path.join(PYANNOTE_DEFAULT_PATH, "pytorch_model.bin")
|
||||||
|
|
||||||
# if path_to_embedding:
|
|
||||||
# yml["pipeline"]["params"]["embedding"] = path_to_embedding
|
|
||||||
# else:
|
|
||||||
# yml["pipeline"]["params"]["embedding"] = os.path.relpath(
|
|
||||||
# os.path.join(
|
|
||||||
# os.path.dirname(__file__),
|
|
||||||
# "models", "pyannote",
|
|
||||||
# "speechbrain",
|
|
||||||
# "spkrec-ecapa-voxceleb",
|
|
||||||
# "embedding_model.ckpt"))
|
|
||||||
|
|
||||||
if not os.path.exists(yml["pipeline"]["params"]["segmentation"]):
|
if not os.path.exists(yml["pipeline"]["params"]["segmentation"]):
|
||||||
raise FileNotFoundError(f"Segmentation model not found at {yml['pipeline']['params']['segmentation']}")
|
raise FileNotFoundError(f"Segmentation model not found at {yml['pipeline']['params']['segmentation']}")
|
||||||
|
|
||||||
# if not os.path.exists(yml["pipeline"]["params"]["embedding"]):
|
|
||||||
# raise FileNotFoundError(f"Embedding model not found at {yml['pipeline']['params']['embedding']}")
|
|
||||||
|
|
||||||
with open(file, "w") as stream:
|
with open(file, "w") as stream:
|
||||||
yaml.dump(yml, stream)
|
yaml.dump(yml, stream)
|
||||||
stream.close()
|
stream.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user