# By right we should take the bob.db.avspoof.spoofing.Database(), which implements antispoofing.utils.db interface, but that interface does not support Id's for file objects (see antispoofing.utils.File). It's a problem for us here, since we need to sort files by their Id's and also we need to yeild the id of each file.
# So, we are using the direct access to the Database here.
self.db=bob.db.avspoof.Database()
# retrieve all file paths for the given parameters
A replay attack consists of replaying a pre-recorded speech to an ASV system.
We assume that the ASV system has a good quality microphone and the replay attack targets this sensor:
* **Replay-phone1**: Replay attack using the data captured by the Samsung mobile. The speech recorded by this mobile is replayed using its own speakers and re-recorded by the microphone of the ASV system.
* **Replay-phone2**: Replay attack using the data captured by the iPhone mobile. The speech recorded by this mobile is replayed using its own speakers and re-recorded by the microphone of the ASV system.
* **Replay-laptop**: Replay attack using the data captured by the microphone of the ASV system. The speech recorded by this microphone is replayed using the laptop speakers and re-recorded again by the microphone of the system.
* **Replay-laptop-HQ**: Replay attack using the data captured by the microphone of the ASV system. The speech recorded by this microphone is replayed using external high-quality loudspeakers and re-recorded using the microphone of the ASV system.
Speech Synthesis Attacks
------------------------
The speech synthesis attacks were based on statistical parametric speech synthesis (SPSS).
More specific, hidden Markov model (HMM)-based speech synthesis technique was used.
* **Speech-Synthesis-LA**: Speech synthesis via logical access. The synthesized speech is directly presented to the ASV system without being re-recorded.
* **Speech-Synthesis-PA**: Speech synthesis via physical access. The synthesized speech is replayed using the laptop speakers and re-recorded by the microphone of the ASV system.
* **Speech-Synthesis-PA-HQ**: Speech synthesis via high-quality physical access. The synthesized speech is replayed using external high-quality loudspeakers and re-recorded by the microphone of the ASV system.
Voice Conversion Attacks
------------------------
The voice conversion attacks were created using Festvox. A conversion function
for each pair of source-target speaker is found based on the learned GMM model/parameters
by using the source and target speakers training data. We did not consider cross-gender
voice conversion attacks, that is only male-to-male and female-to-female conversions
were taken into account. As in the case of speech synthesis, three possible scenarios are involved:
* **Voice-Conversion-LA**: Voice conversion via logical access. The converted speech is directly presented to the system without being re-recorded.
* **Voice-Conversion-PA**: Voice conversion via physical access. The converted speech is replayed using the speakers of the laptop and re-recorded by the microphone of the ASV system.
* **Voice-Conversion-PA-HQ**: Voice conversion via high-quality physical access. The converted speech is replayed using external high-quality loudspeakers and re-recorded by the microphone of the ASV system.
Specificities to the BEAT View
==============================
Spoofing and genuine samples are each labelled with a text field that defines
the class of the sample: ``"attack"`` or ``"real"`` for simple anti-spoofing
binary classification systems. Code using this
database views may use the ``class`` field to differentiate samples.
The view supports the following protocols, which are also available in the database:
``smalltest`` (for prove of concept experiments only, as a subset of only three clients is
provided for each set), ``grandtest`` (data of the whole database is provided), ``physical_access``
(only replay/presentation attack are provided), and ``logical_access`` (only logical access