mirror of
https://github.com/pyannote/pyannote-audio.git
synced 2026-11-20 13:07:51 +09:00
feat: switch to pyannote.core 6.0.1
This commit is contained in:
1 parent
d30d3c0299
commit
1c8786ceb6
3 files changed
+5
-5
No files matched your search
@@ -46,7 +46,7 @@ with ProgressHook() as hook:
|
||||
output = pipeline("audio.wav", hook=hook) # runs locally
|
||||
|
||||
# print the result
|
||||
for turn, _, speaker in output.speaker_diarization.itertracks(yield_label=True):
|
||||
for turn, speaker in output.speaker_diarization:
|
||||
print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}")
|
||||
# start=0.2s stop=1.5s speaker_0
|
||||
# start=1.8s stop=3.9s speaker_1
|
||||
@@ -67,10 +67,10 @@ from pyannote.audio import Pipeline
|
||||
pipeline = Pipeline.from_pretrained(
|
||||
"pyannote/speaker-diarization-precision-2", token="PYANNOTEAI_API_KEY")
|
||||
|
||||
diarization = pipeline("audio.wav") # runs on pyannoteAI servers
|
||||
output = pipeline("audio.wav") # runs on pyannoteAI servers
|
||||
|
||||
# print the result
|
||||
for turn, _, speaker in diarization.itertracks(yield_label=True):
|
||||
for turn, speaker in output.speaker_diarization:
|
||||
print(f"start={turn.start:.1f}s stop={turn.end:.1f}s {speaker}")
|
||||
# start=0.2s stop=1.6s SPEAKER_00
|
||||
# start=1.8s stop=4.0s SPEAKER_01
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ dependencies = [
|
||||
"opentelemetry-api==1.34.0",
|
||||
"opentelemetry-sdk==1.34.0",
|
||||
"opentelemetry-exporter-otlp==1.34.0",
|
||||
"pyannote-core>=6.0.0",
|
||||
"pyannote-core>=6.0.1",
|
||||
"pyannote-database>=6.0.0",
|
||||
"pyannote-metrics>=4.0.0",
|
||||
"pyannote-pipeline>=4.0.0",
|
||||
|
||||
@@ -171,7 +171,7 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline):
|
||||
|
||||
# print diarization
|
||||
>>> assert isinstance(output.speaker_diarization, pyannote.core.Annotation)
|
||||
>>> for turn, _, speaker in output.speaker_diarization.itertracks(yield_label=True):
|
||||
>>> for turn, speaker in output.speaker_diarization:
|
||||
... print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}")
|
||||
|
||||
# get one speaker embedding per speaker
|
||||
|
||||
Reference in new issue
Block a user