Ë
      çi7!  ã                   ó&   — d dl mZ  G d„ de«      Zy)é   )ÚProtocolc                   ó–   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zdd„Zdd„Zdd„Zd„ Zdd„Zdd„Zd„ Zdd„Zdd„Zd„ Zy)ÚSpeakerRecognitionProtocolaŒ  Speaker recognition protocol

    Parameters
    ----------
    preprocessors : dict or (key, preprocessor) iterable
        When provided, each protocol item (dictionary) are preprocessed, such
        that item[key] = preprocessor(item). In case 'preprocessor' is not
        callable, it should be a string containing placeholder for item keys
        (e.g. {'wav': '/path/to/{uri}.wav'})
    c                 ó   — t        d«      ‚)Nz@Custom speaker recognition protocol should implement "trn_iter".©ÚNotImplementedError©Úselfs    úƒ/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/pyannote/database/protocol/speaker_recognition.pyÚtrn_iterz#SpeakerRecognitionProtocol.trn_iter-   ó   € Ü!ØQó
ð 	
ó    c                 ó   — t        d«      ‚)NzGCustom speaker recognition protocol should implement "trn_enroll_iter".r   r	   s    r   Útrn_enroll_iterz*SpeakerRecognitionProtocol.trn_enroll_iter2   ó   € Ü!ØXó
ð 	
r   c                 ó   — t        d«      ‚)NzECustom speaker recognition protocol should implement "trn_test_iter".r   r	   s    r   Útrn_test_iterz(SpeakerRecognitionProtocol.trn_test_iter7   ó   € Ü!ØVó
ð 	
r   c                 ó   — t        d«      ‚)Nz@Custom speaker recognition protocol should implement "trn_keys".r   r	   s    r   Útrn_keysz#SpeakerRecognitionProtocol.trn_keys<   r   r   c                 ó   — t        d«      ‚)NzGCustom speaker recognition protocol should implement "dev_enroll_iter".r   r	   s    r   Údev_enroll_iterz*SpeakerRecognitionProtocol.dev_enroll_iterA   r   r   c                 ó   — t        d«      ‚)NzECustom speaker recognition protocol should implement "dev_test_iter".r   r	   s    r   Údev_test_iterz(SpeakerRecognitionProtocol.dev_test_iterF   r   r   c                 ó   — t        d«      ‚)Nz@Custom speaker recognition protocol should implement "dev_keys".r   r	   s    r   Údev_keysz#SpeakerRecognitionProtocol.dev_keysK   r   r   c                 ó   — t        d«      ‚)NzGCustom speaker recognition protocol should implement "tst_enroll_iter".r   r	   s    r   Útst_enroll_iterz*SpeakerRecognitionProtocol.tst_enroll_iterP   r   r   c                 ó   — t        d«      ‚)NzECustom speaker recognition protocol should implement "tst_test_iter".r   r	   s    r   Útst_test_iterz(SpeakerRecognitionProtocol.tst_test_iterU   r   r   c                 ó   — t        d«      ‚)Nz?Custom speaker recognition protocol should implement tst_keys".r   r	   s    r   Útst_keysz#SpeakerRecognitionProtocol.tst_keysZ   s   € Ü!ØPó
ð 	
r   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)aØ  Iterate over the training set

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  unique recording identifier
* channel: int
  index of resource channel to use
* speaker: str
  unique speaker identifier

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.train():
...     uri = item['uri']
...     channel = item['channel']
...     speaker = item['speaker']
        N)r   Ú
preprocess©r
   Ú
yield_nameÚ	generatorÚnameÚitems        r   Útrainz SpeakerRecognitionProtocol.train_   sG   è ø€ ð0 —M‘M“Oˆ	ã#‰JˆD�$ÙØ˜DŸO™O¨DÓ1Ð1Ó1à—o‘o dÓ+Ó+ñ	 $ùó   ‚AA	c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)aª  Iterate over the training set enrollments

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.train_enroll():
...     uri = item['uri']
...     channel = item['channel']
        N)r   r$   r%   s        r   Útrain_enrollz'SpeakerRecognitionProtocol.train_enroll   óJ   è ø€ ð* ×(Ñ(Ó*ˆ	ã#‰JˆD�$ÙØ˜DŸO™O¨DÓ1Ð1Ó1à—o‘o dÓ+Ó+ñ	 $ùr+   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)a¢  Iterate over the training set tests

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.train_test():
...     uri = item['uri']
...     channel = item['channel']
        N)r   r$   r%   s        r   Ú
train_testz%SpeakerRecognitionProtocol.train_testœ   óJ   è ø€ ð* ×&Ñ&Ó(ˆ	ã#‰JˆD�$ÙØ˜DŸO™O¨DÓ1Ð1Ó1à—o‘o dÓ+Ó+ñ	 $ùr+   c                 ó"   — | j                  «       S ©N)r   r	   s    r   Ú
train_keysz%SpeakerRecognitionProtocol.train_keys¹   ó   € Ø�}‰}‹Ðr   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)a³  Iterate over the development set enrollments

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.development_enroll():
...     uri = item['uri']
...     channel = item['channel']
        N)r   r$   r%   s        r   Údevelopment_enrollz-SpeakerRecognitionProtocol.development_enroll¼   r.   r+   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)a«  Iterate over the development set tests

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.development_test():
...     uri = item['uri']
...     channel = item['channel']
        N)r   r$   r%   s        r   Údevelopment_testz+SpeakerRecognitionProtocol.development_testÙ   r1   r+   c                 ó"   — | j                  «       S r3   )r   r	   s    r   Údevelopment_keysz+SpeakerRecognitionProtocol.development_keysö   r5   r   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)aî  Iterate over the test set targets

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use
* speaker: str
  unique speaker identifier

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.test_enroll():
...     uri = item['uri']
...     channel = item['channel']
...     speaker = item['speaker']
        N)r   r$   r%   s        r   Útest_enrollz&SpeakerRecognitionProtocol.test_enrollù   sJ   è ø€ ð0 ×(Ñ(Ó*ˆ	ã#‰JˆD�$ÙØ˜DŸO™O¨DÓ1Ð1Ó1à—o‘o dÓ+Ó+ñ	 $ùr+   c              #   ó–   K  — | j                  «       }|D ]0  \  }}|r|| j                  |«      f–— Œ| j                  |«      –— Œ2 y­w)a�  Iterate over the test set tests

This will yield dictionaries with the followings keys:

* database: str
  unique database identifier
* uri: str
  uniform (or unique) resource identifier
* channel: int
  index of resource channel to use

as well as keys coming from the provided preprocessors.

Usage
-----
>>> for item in protocol.test_test():
...     uri = item['uri']
...     channel = item['channel']
        N)r    r$   r%   s        r   Ú	test_testz$SpeakerRecognitionProtocol.test_test  r1   r+   c                 ó"   — | j                  «       S r3   )r"   r	   s    r   Ú	test_keysz$SpeakerRecognitionProtocol.test_keys6  r5   r   N)F)T)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r    r"   r*   r-   r0   r4   r7   r9   r;   r=   r?   rA   © r   r   r   r   !   sm   „ ñ	ò
ò

ò

ò

ò

ò

ò

ò

ò

ò

ó
,ó@,ó:,ò:ó,ó:,ò:ó,ó@,ó:r   r   N)Úprotocolr   r   rF   r   r   Ú<module>rH      s   ðõ< ôV õ Vr   