Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DETECTION OF REPLAY ATTACK
Document Type and Number:
WIPO Patent Application WO/2020/025951
Kind Code:
A1
Abstract:
A method of detecting a replay attack comprises:receiving an audio signal representing speech;identifying speech content present in at least a portion of the audio signal;obtaining information about a frequency spectrum of each portion of the audio signal for which speech content is identified;and, for each portion of the audio signal for which speech content is identified:retrieving information about an expected frequency spectrum of the audio signal;comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum; and determining that the audio signal may result from a replay attack if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level.

Inventors:
LESSO JOHN PAUL (GB)
ALONSO CÉSAR (ES)
VICKERS EARL CORBAN (US)
Application Number:
PCT/GB2019/052143
Publication Date:
February 06, 2020
Filing Date:
July 31, 2019
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
CIRRUS LOGIC INT SEMICONDUCTOR LTD (GB)
International Classes:
G10L17/00
Foreign References:
GB2552723A2018-02-07
GB201719734A2017-11-28
Other References:
JESUS VILLALBA ET AL: "Preventing replay attacks on speaker verification systems", SECURITY TECHNOLOGY (ICCST), 2011 IEEE INTERNATIONAL CARNAHAN CONFERENCE ON, 2 October 2011 (2011-10-02), pages 1 - 8, XP055544206, ISBN: 978-1-4577-0902-9, DOI: 10.1109/CCST.2011.6095943
CHEN SI ET AL: "You Can Hear But You Cannot Steal: Defending Against Voice Impersonation Attacks on Smartphones", PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, IEEE COMPUTER SOCIETY, US, 5 June 2017 (2017-06-05), pages 183 - 195, XP033122979, ISSN: 1063-6927, [retrieved on 20170713], DOI: 10.1109/ICDCS.2017.133
LANTIAN LI ET AL: "A Study on Replay Attack and Anti-Spoofing for Automatic Speaker Verification", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 7 June 2017 (2017-06-07), XP080768093, DOI: 10.21437/INTERSPEECH.2017-456
Attorney, Agent or Firm:
HASELTINE LAKE KEMPNER LLP et al. (GB)
Download PDF:
Claims:
CLAIMS

1. A method of detecting a replay attack, the method comprising:

receiving an audio signal representing speech;

identifying speech content present in at least a portion of the audio signal;

obtaining information about a frequency spectrum of each portion of the audio signal for which speech content is identified; and

for each portion of the audio signal for which speech content is identified:

retrieving information about an expected frequency spectrum of the audio signal; comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum; and determining that the audio signal may result from a replay attack if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level.

2. A method according to claim 1 , comprising:

removing effects of a channel and/or noise from the received audio signal; and using the audio signal after removing the effects of the channel and/or noise when obtaining the information about the frequency spectrum of each portion of the audio signal for which speech content is identified.

3. A method according to claim 1 , wherein identifying speech content present in at least a portion of the audio signal comprises identifying at least one test acoustic class.

4. A method according to claim 3, wherein the at least one test acoustic class comprises one or more specific phonemes.

5. A method according to claim 4, wherein the at least one test acoustic class comprises fricatives.

6. A method according to claim 5, wherein the at least one test acoustic class comprises sibilants. 7. A method according to claim 4, wherein the at least one test acoustic class comprises plosives.

8. A method according to claim 3, wherein identifying at least one test acoustic class comprises identifying a location of occurrences of the test acoustic class in known speech content.

9. A method according to claim 8, wherein the known speech content comprises a pass phrase.

10. A method according to claim 1 , wherein comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum comprises:

comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in a frequency band in the range of 5-20kHz.

11. A method according to claim 1 , wherein comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum comprises:

comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in a frequency band of 20-200Hz.

12. A method according to claim 1 , wherein comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum comprises:

comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in an ultrasonic frequency band. 13. A method according to claim 1 , wherein comparing the identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic class comprises:

comparing a power level in at least one frequency band of the identified parts of the audio signal with a power level in at least one corresponding frequency band of the expected spectrum of the audio signal.

14. A method according to claim 13, wherein the measure of the difference between the identified parts of the audio signal and the respective retrieved information for the corresponding test acoustic class comprises a difference in power of greater than 1dB.

15. A method according to claim 1 , further comprising:

performing a speaker identification process on the received audio signal; and for each test acoustic class, retrieving information about an expected spectrum of the audio signal for a speaker identified by said speaker identification process.

16. A method according to claim 1 ,

wherein the step of retrieving information about an expected frequency spectrum of the audio signal comprises identifying locations in the audio signal where at least one specific acoustic class is expected to appear; and

wherein the step of comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum comprises comparing the frequency spectrum at said identified locations with the expected frequency spectrum at said identified locations.

17. A method according to claim 16, wherein the specific acoustic class comprises at least some fricatives.

18. A method according to claim 16 and 17, comprising determining whether the frequency spectrum, at said locations where fricatives are expected to appear, is characteristic of fricatives.

19. A method according to claim 16, 17 or 18, wherein the step of identifying locations in the audio signal where at least one specific acoustic class is expected to appear comprises identifying locations in a predetermined utterance where the at least one specific acoustic class appears.

20. A method according to claim 19, wherein the predetermined utterance comprises a pass phrase.

21. A system for detecting a replay attack, the system comprising:

an input, for receiving an audio signal representing speech; and

a processor, wherein the processor is configured for: identifying speech content present in at least a portion of the audio signal;

obtaining information about a frequency spectrum of each portion of the audio signal for which speech content is identified;

for each portion of the audio signal for which speech content is identified, retrieving information about an expected frequency spectrum of the audio signal; comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum; and determining that the audio signal may result from a replay attack if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level.

22. A device comprising a system as claimed in claim 21 , wherein the device comprises one of: a smartphone, a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, or a domestic appliance.

23. A computer program product, comprising a tangible computer-readable medium, storing code for causing a suitable programmed processor to perform a method as claimed in claim 1.

24. A method of detecting a replay attack, the method comprising:

receiving an audio signal representing speech;

identifying at least one part of the audio signal in which the speech consists of fricatives;

obtaining information about an amount of energy present at ultrasonic frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies.

25. A method according to claim 24, further comprising:

obtaining information about an amount of energy present at ultrasonic frequencies during a second part of the audio signal in which the speech consists of voiced speech; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies and based on said information about the amount of energy present at ultrasonic frequencies during the second part of the audio signal.

26. A method according to claim 25, comprising:

determining whether the audio signal may result from a replay attack based on a ratio of the amount of energy present at ultrasonic frequencies during said at least one part of the audio signal to the amount of energy present at ultrasonic frequencies during the second part of the audio signal.

27. A method according to claim 24, 25, or 26, further comprising:

obtaining information about an amount of energy present at audible frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies and based on said information about the amount of energy present at audible frequencies during said at least one part of the audio signal.

28. A method according to claim 27, comprising:

determining whether the audio signal may result from a replay attack based on a ratio of the amount of energy present at ultrasonic frequencies to the amount of energy present at audible frequencies during said at least one part of the audio signal.

29. A method according to any of claims 24 to 28, comprising:

calculating a first ratio of the amount of energy present at ultrasonic frequencies to the amount of energy present at audible frequencies during said at least one part of the audio signal;

calculating a second ratio of the amount of energy present at ultrasonic frequencies during a second part of the audio signal in which the speech consists of voiced speech to the amount of energy present at audible frequencies during the second part of the audio signal; and

calculating a ratio of the first ratio to the second ratio.

30. A system for detecting a replay attack, the system comprising:

an input, for receiving an audio signal representing speech; and

a processor, wherein the processor is configured for: identifying at least one part of the audio signal in which the speech consists of fricatives;

obtaining information about an amount of energy present at ultrasonic frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies.

31. A device comprising a system as claimed in claim 30, wherein the device comprises one of: a smartphone, a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, or a domestic appliance.

32. A computer program product, comprising a tangible computer-readable medium, storing code for causing a suitable programmed processor to perform a method as claimed in claim 24.

Description:
DETECTION OF REPLAY ATTACK

Technical Field Embodiments described herein relate to methods and devices for detecting a replay attack on a voice biometrics system.

Background Voice biometrics systems are becoming widely used. In such a system, a user trains the system by providing samples of their speech during an enrolment phase. In subsequent use, the system is able to discriminate between the enrolled user and nonregistered speakers. Voice biometrics systems can in principle be used to control access to a wide range of services and systems.

One way for a malicious party to attempt to defeat a voice biometrics system is to obtain a recording of the enrolled user’s speech, and to play back the recording in an attempt to impersonate the enrolled user and to gain access to services that are intended to be restricted to the enrolled user.

This is referred to as a replay attack, or as a spoofing attack.

Summary According to an aspect of the present invention, there is provided a method of detecting a replay attack, the method comprising:

receiving an audio signal representing speech;

identifying speech content present in at least a portion of the audio signal;

obtaining information about a frequency spectrum of each portion of the audio signal for which speech content is identified;

for each portion of the audio signal for which speech content is identified, retrieving information about an expected frequency spectrum of the audio signal;

comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum; and determining that the audio signal may result from a replay attack if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level.

The method may further comprise:

removing effects of a channel and/or noise from the received audio signal; and using the audio signal after removing the effects of the channel and/or noise when obtaining the information about the frequency spectrum of each portion of the audio signal for which speech content is identified.

Identifying speech content present in at least a portion of the audio signal may comprise identifying at least one test acoustic class. The at least one test acoustic class may comprise one or more specific phonemes. The at least one test acoustic class may comprise fricatives, especially sibilants; and/or may comprise plosives.

Identifying at least one test acoustic class may comprise identifying a location of occurrences of the test acoustic class in known speech content. The known speech content may comprise a pass phrase.

Comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum may comprise: comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in a frequency band in the range of 5kHz-20kHz.

Comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum may comprise: comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in a frequency band in the range of 20Hz-200Hz.

Comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum may comprise: comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum in an ultrasonic frequency band. Comparing the identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic class may comprise:

comparing a power level in at least one frequency band of the identified parts of the audio signal with a power level in at least one corresponding frequency band of the expected spectrum of the audio signal.

The measure of the difference between the identified parts of the audio signal and the respective retrieved information for the corresponding test acoustic class may comprise a difference in power of greater than 1dB.

The method may further comprise:

performing a speaker identification process on the received audio signal; and for each test acoustic class, retrieving information about an expected spectrum of the audio signal for a speaker identified by said speaker identification process.

The step of retrieving information about an expected frequency spectrum of the audio signal may comprise identifying locations in the audio signal where at least one specific acoustic class is expected to appear; and the step of comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum may comprise comparing the frequency spectrum at said identified locations with the expected frequency spectrum at said identified locations.

The specific acoustic class may comprise at least some fricatives.

The method may comprise determining whether the frequency spectrum, at said locations where fricatives are expected to appear, is characteristic of fricatives.

The step of identifying locations in the audio signal where at least one specific acoustic class is expected to appear may comprise identifying locations in a predetermined utterance where the at least one specific acoustic class appears.

The predetermined utterance may comprise a pass phrase. According to another aspect of the invention, there is provided a system for detecting a replay attack, the system comprising:

an input, for receiving an audio signal representing speech; and

a processor, wherein the processor is configured for:

identifying speech content present in at least a portion of the audio signal;

obtaining information about a frequency spectrum of each portion of the audio signal for which speech content is identified;

for each portion of the audio signal for which speech content is identified, retrieving information about an expected frequency spectrum of the audio signal; comparing the frequency spectrum of portions of the audio signal for which speech content is identified with the respective expected frequency spectrum; and determining that the audio signal may result from a replay attack if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level.

There is also provided a device comprising such a system, wherein the device comprises one of: a smartphone, a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, or a domestic appliance.

According to a further aspect of the invention, there is provided a computer program product, comprising a tangible computer-readable medium, storing code for causing a suitable programmed processor to perform the method of the first aspect.

According to a second aspect, there is provided a method of detecting a replay attack, the method comprising:

receiving an audio signal representing speech;

identifying at least one part of the audio signal in which the speech consists of fricatives;

obtaining information about an amount of energy present at ultrasonic frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies.

The method may further comprise: obtaining information about an amount of energy present at ultrasonic frequencies during a second part of the audio signal in which the speech consists of voiced speech; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies and based on said information about the amount of energy present at ultrasonic frequencies during the second part of the audio signal.

The method may comprise:

determining whether the audio signal may result from a replay attack based on a ratio of the amount of energy present at ultrasonic frequencies during said at least one part of the audio signal to the amount of energy present at ultrasonic frequencies during the second part of the audio signal.

The method may further comprise:

obtaining information about an amount of energy present at audible frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies and based on said information about the amount of energy present at audible frequencies during said at least one part of the audio signal.

The method may comprise:

determining whether the audio signal may result from a replay attack based on a ratio of the amount of energy present at ultrasonic frequencies to the amount of energy present at audible frequencies during said at least one part of the audio signal.

The method may comprise:

calculating a first ratio of the amount of energy present at ultrasonic frequencies to the amount of energy present at audible frequencies during said at least one part of the audio signal;

calculating a second ratio of the amount of energy present at ultrasonic frequencies during a second part of the audio signal in which the speech consists of voiced speech to the amount of energy present at audible frequencies during the second part of the audio signal; and

calculating a ratio of the first ratio to the second ratio. According to another aspect, there is provided a system for detecting a replay attack, the system comprising:

an input, for receiving an audio signal representing speech; and

a processor, wherein the processor is configured for:

identifying at least one part of the audio signal in which the speech consists of fricatives;

obtaining information about an amount of energy present at ultrasonic frequencies during said at least one part of the audio signal; and

determining whether the audio signal may result from a replay attack based on said information about the amount of energy present at ultrasonic frequencies.

There is also provided a device comprising such a system, wherein the device comprises one of: a smartphone, a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, or a domestic appliance.

According to a further aspect, there is provided a computer program product, comprising a tangible computer-readable medium, storing code for causing a suitable programmed processor to perform a method in accordance with the second aspect.

Brief Description of Drawings For a better understanding of the present invention, and to show how it may be put into effect, reference will now be made to the accompanying drawings, in which:-

Figure 1 illustrates a smartphone. Figure 2 is a schematic diagram, illustrating the form of the smartphone.

Figure 3 shows an example of a situation in which a replay attack is being performed.

Figure 4 is a block diagram illustrating the functional blocks in a voice biometrics system. Figure 5 is a flow chart, illustrating a method of detecting a replay attack on the voice biometrics system.

Figure 6 illustrates a part of the system of Figure 4.

Figures 7-9 illustrate examples of comparisons between identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic classes, in a number of situations in which the audio signal may have resulted from a replay attack.

Detailed Description of Embodiments

The description below sets forth example embodiments according to this disclosure. Further example embodiments and implementations will be apparent to those having ordinary skill in the art. Further, those having ordinary skill in the art will recognize that various equivalent techniques may be applied in lieu of, or in conjunction with, the embodiments discussed below, and all such equivalents should be deemed as being encompassed by the present disclosure.

The methods described herein can be implemented in a wide range of devices and systems, for example a mobile telephone, an audio player, a video player, a mobile computing platform, a games device, a remote controller device, a toy, a machine, or a home automation controller or a domestic appliance. However, for ease of explanation of one embodiment, an illustrative example will be described, in which the

implementation occurs in a smartphone.

Figure 1 illustrates a smartphone 10, having microphones 12, 12a, and 12b for detecting ambient sounds. In this example, the microphone 12 is of course used for detecting the speech of a user who is holding the smartphone 10, while the microphones 12a, 12b are provided on the upper part of the sides of the smartphone 10, and are therefore not clearly visible in Figure 1.

The smartphone 10 is just one example of an electronic device in which the methods described herein can be performed. The methods can similarly be performed in another portable electronic device, such as a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, or a domestic appliance.

Figure 2 is a schematic diagram, illustrating the form of the smartphone 10.

Specifically, Figure 2 shows various interconnected components of the smartphone 10. It will be appreciated that the smartphone 10 will in practice contain many other components, but the following description is sufficient for an understanding of the present invention.

Thus, Figure 2 shows the microphone 12 mentioned above. In certain embodiments, the smartphone 10 is provided with multiple microphones 12, 12a, 12b, etc.

Figure 2 also shows a memory 14, which may in practice be provided as a single component or as multiple components. The memory 14 is provided for storing data and program instructions.

Figure 2 also shows a processor 16, which again may in practice be provided as a single component or as multiple components. For example, one component of the processor 16 may be an applications processor of the smartphone 10.

Figure 2 also shows a transceiver 18, which is provided for allowing the smartphone 10 to communicate with external networks. For example, the transceiver 18 may include circuitry for establishing an internet connection either over a WiFi local area network or over a cellular network.

Figure 2 also shows audio processing circuitry 20, for performing operations on the audio signals detected by the microphone 12 as required. For example, the audio processing circuitry 20 may filter the audio signals or perform other signal processing operations.

Figure 2 also shows at least one sensor 22. In embodiments of the present invention, the sensor is a magnetic field sensor for detecting a magnetic field. For example, the sensor 22 may be a Hall effect sensor, that is able to provide separate measurements of the magnet field strength in three orthogonal directions. Further examples of sensors which may be used may comprise gyro sensors, accelerometers, or software based sensors operable to determine phone orientation, wherein such software-based sensors may operate in combination with software programs such as such as the FaceTime™ system provided by Apple, Inc.

In this embodiment, the smartphone 10 is provided with voice biometric functionality, and with control functionality. Thus, the smartphone 10 is able to perform various functions in response to spoken commands from an enrolled user. The biometric functionality is able to distinguish between spoken commands from the enrolled user, and the same commands when spoken by a different person. Thus, certain

embodiments of the invention relate to operation of a smartphone or another portable electronic device with some sort of voice operability, for example a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, a domestic appliance, or the like, in which the voice biometric functionality is performed in the device that is intended to carry out the spoken command. Certain other embodiments relate to systems in which the voice biometric functionality is performed on a smartphone or other device, which then transmits the commands to a separate device if the voice biometric functionality is able to confirm that the speaker was the enrolled user.

In some embodiments, while voice biometric functionality is performed on the smartphone 10 or other device that is located close to the user, the spoken commands are transmitted using the transceiver 18 to a remote speech recognition system, which determines the meaning of the spoken commands. For example, the speech recognition system may be located on one or more remote server in a cloud computing environment. Signals based on the meaning of the spoken commands are then returned to the smartphone 10 or other local device. In other embodiments, the speech recognition system is also provided on the smartphone 10.

One attempt to deceive a voice biometric system is to play a recording of an enrolled user’s voice in a so-called replay or spoof attack.

Figure 3 shows an example of a situation in which a replay attack is being performed. Thus, in Figure 3, the smartphone 10 is provided with voice biometric functionality. In this example, the smartphone 10 is in the possession, at least temporarily, of an attacker, who has another smartphone 30. The smartphone 30 has been used to record the voice of the enrolled user of the smartphone 10. The smartphone 30 is brought close to the microphone inlet 12 of the smartphone 10, and the recording of the enrolled user’s voice is played back. If the voice biometric system is unable to detect that the enrolled user’s voice that it detects is a recording, the attacker will gain access to one or more services that are intended to be accessible only by the enrolled user.

It is known that smartphones, such as the smartphone 30, are typically provided with loudspeakers that are of relatively low quality due to size constraints. Thus, the recording of an enrolled user’s voice played back through such a loudspeaker will not be a perfect match with the user’s voice, and this fact can be used to identify replay attacks. For example, loudspeakers may have certain frequency characteristics, and if these frequency characteristics can be detected in a speech signal that is received by the voice biometrics system, it may be considered that the speech signal has resulted from a replay attack.

For example, at frequencies below a lower threshold frequency, a loudspeaker may suffer from low-frequency roll-off, as the bass response is limited by the size of the loudspeaker diaphragm. The lower threshold frequency may be 200Hz. In another example, at frequencies above an upper threshold frequency, a loudspeaker may suffer from high-frequency roll-off. Although good quality audio recording equipment, amplifiers, loudspeakers, etc. are designed to present very high fidelity in the audible frequency range (for example up to about 20kHz), even high quality audio systems typically present a high attenuation in their frequency response above about 20kHz.

The average human being cannot perceive sounds in this frequency range, and so it is not usually worthwhile for system designers to provide high-fidelity recording and reproduction of such sounds.

The size of these effects will be determined by the quality of the loudspeaker. For example, in a high quality loudspeaker, the lower threshold frequency and the upper threshold frequency should be such that there is minimal low-frequency roll-off or high- frequency roll-off within the frequency range that is typically audible to humans.

However, size and cost constraints mean that many commercially available

loudspeakers, such as those provided in smartphones such as the smartphone 30, do suffer from these effects to some extent.

Thus, a loudspeaker may be unable to reproduce ultrasonic and/or near ultrasonic frequencies well. In these circumstances, if the ultrasonic and/or near ultrasonic frequency components of a detected speech signal are not at a power level which may be expected for“typical” speech, this may indicate that the detected speech signal resulted from a replay attack.

However, not all speech contains the same level of ultrasonic and/or near ultrasonic frequency components. For example, some groups of consonants such as fricatives and plosives contain relatively high levels of ultrasonic and near ultrasonic frequencies. If a detected speech signal relates to speech that contains higher than normal amounts of speech in an acoustic class (or classes) such as these, which comprise relatively large components of ultrasonic and/or near ultrasonic frequencies, then, in the result of a replay attack through a loudspeaker that reduces the level of the ultrasonic and/or near ultrasonic frequency components, the ultrasonic and/or near ultrasonic

frequencies in the detected speech signal may still be present at a power level that is similar to the power level that would be excepted for these frequencies in“typical” speech. Thus, in this situation, the system may not recognise that the speech signal may have resulted from a replay attack.

If the acoustic class of a detected speech signal, and the expected frequency characteristics of said acoustic class, can be determined, then the frequency characteristics of the detected speech signal may be able to be used to more reliably determine if the detected signal may have resulted from a replay attack.

Figure 4 is a block diagram illustrating the functional blocks in a voice biometrics system, and Figure 5 is a flow chart, illustrating a method of detecting a replay attack on the voice biometrics system.

As shown in Figure 4, a microphone 12 (for example one of the microphones in the smartphone 10) detects a sound, and this is passed to an initial processing block 40. The microphone 12 is capable of detecting audible sounds and sounds in the ultrasound range. As used herein, the term“ultrasound” (and“ultrasonic”) refers to sounds in the upper part of the audible frequency range, and above the audible frequency range. Thus, the term“ultrasound” (and“ultrasonic”) refers to sounds at frequencies above about 15kHz.

The initial processing block 40 may for example include an analog-to-digital converter, for converting signals received from an analog microphone into digital form, and may also include a buffer, for storing signals. The analog-to-digital conversion involves sampling the received signal at a sampling rate. The sampling rate must be chosen to be high enough that any frequency components of interest are retained in the digital signal. For example, as described in more detail below, some embodiments of the invention involve looking at ultrasonic components of the received signal, for example in the region of 20-30kHz. As is well known from the Nyquist sampling theorem, the sampling rate of a digital signal need to be at least twice the highest frequency component of the signal. Thus, in order to properly sample a signal containing components at frequencies up to 30kHz, the sampling rate needs to be at least 60kHz.

A typical smartphone may be capable of sampling at a sample rate of up to 192kHz (which is high enough to provide a 96kHz bandwidth), and so the sampling rate can be set to any suitable value that accommodates the intended frequency components.

As is conventional, the signal may be divided into frames, for example of 10-100ms duration.

Thus, in step 60 in the method of Figure 5, an audio signal representing speech is received.

The received audio signal representing speech may then be passed to a spectrum extraction block 42. The spectrum extraction block 42 may be configured to obtain a spectrum of the received audio signal. In some examples, the spectrum extraction block 42 may be configured to obtain a power spectrum of the received audio signal, while, in some other examples, the spectrum extraction block 42 may be configured to obtain an energy spectrum of the received audio signal.

In some examples, the spectrum extraction block 42 may be configured to perform a fast Fourier transform on the received audio signal. The result of the fast Fourier transform is an indication of the power or energy present in the signal at different frequencies.

In another example, the spectrum extraction block 42 may be configured to apply several band-pass filters to the received audio signal representing speech. Each band pass filter may only allow signals within a particular frequency band of the received audio signal to pass through. The received audio signal representing speech, and the spectrum obtained by the spectrum extraction block 42, may then be passed to a channel/noise compensation block 44. As will be appreciated, the received audio signal representing speech may be affected by properties of the channel (which we take to mean any factor that produces a difference between the user’s speech and the speech signal as generated by the microphone alters). The received audio signal representing speech may also be affected by noise. The channel/noise compensation block 44 may be configured to remove the effects of a channel and/or noise from the received audio signal representing speech, to obtain a cleaned received audio signal representing speech.

An example embodiment of the channel/noise compensation block 44 is described in greater detail below.

Specifically, Figure 6 shows a channel/noise compensation system, which is described in more detail in UK Patent Application No. 1719734.4.

In Figure 6, the signal received on an input 70 is passed to a voiced/unvoiced detection block 72, which determines when the received signal represents voiced speech, and when it represents unvoiced speech. The voiced/unvoiced detection block 72 thus outputs the first component of the audio signal, S v , representing voiced speech and the second component, S u , representing unvoiced speech. More specifically, in some embodiments, the first component of the audio signal, S v , representing voiced speech and the second component, S u , representing unvoiced speech, are averaged spectra of the voiced and unvoiced components of the speech. By averaged spectra are meant spectra of the speech obtained and averaged over multiple frames.

The signal received on the input 70 is also passed to a speaker recognition block 74, which performs a voice biometric process to identify the speaker, from amongst a plurality of enrolled speakers. The process of enrolment in a speaker recognition system typically involves the speaker providing a sample of speech, from which specific features are extracted, and the extracted features are used to form a model of the speaker’s speech. In use, corresponding features are extracted from a sample of speech, and these are compared with the previously obtained model to obtain a measure of the likelihood that the speaker is the previously enrolled speaker. In the system shown in Figure 6, one or more speaker model is stored, for example in a database 76. Based on the output of the speaker recognition block 74, one or more speaker model is selected. In this embodiment, each speaker model contains separate models of the voiced speech and the unvoiced speech of the enrolled user. More specifically, the model of the voiced speech and the model of the unvoiced speech of the enrolled user each comprise amplitude values corresponding to multiple frequencies.

Thus, the model of the voiced speech may be indicated as M v , where M v represents a vector comprising one amplitude value at each of the selected frequencies, while the model of the unvoiced speech may be indicated as M u , where M u represents a vector comprising one amplitude value at each of the selected frequencies.

As will be appreciated, the received signal, containing the user’s speech, will be affected by the properties of the channel, which we take to mean any factor that produces a difference between the user’s speech and the speech signal as generated by the microphone alters, and the received signal will also be affected by noise.

Thus, assuming that the channel and the noise are constant over the period during which the received signal is averaged to form the first and second components of the received speech, these first and second components can be expressed as:

Sv = aMv + n , and

Su = aMu + n ,

where

a represents the frequency spectrum of a multiplicative disturbance component, referred to herein as the channel, and

n represents the frequency spectrum of an additive disturbance component, referred to herein as the noise.

Thus, with measurements Sv and Su , and with models Mv and Mu , these two equations can therefore be solved in a comparison block 78 for the two unknowns, a and n.

Thus, for illustrative purposes, c Su - Sv )

cc - and

(Mu -Mv)

For completeness, it should be noted that, with measurements of the spectrum made at a plurality of frequencies, these two equations are effectively solved at each of the frequencies.

Alternatively, with measurements made at f different frequencies, the equations Sv = aMv + n , and Su = aMu + n can each be regarded as f different equations to be solved.

In that case, having solved the equations, it may be useful to apply a low-pass filter, or a statistical filter such as a Savitsky-Golay filter, to the results in order to obtain low- pass filtered versions of the channel and noise characteristics.

As an alternative example, a least squares method may be used to obtain solutions to the 2f different equations.

Thus, information is obtained about the channel and/or the noise affecting the audio signal.

Although one possible embodiment of the channel/noise compensation block 44 has been described above, it will be appreciated that the channel/noise compensation block 44 may be configured to perform any suitable method to remove effects of a channel and/or noise from the received audio signal.

In addition, although the system as illustrated in Figure 4 comprises a channel/noise compensation block 44 (and it is the audio signal after removing the effects of the channel and/or noise that is used subsequently, as described below), it will be appreciated that this is optional and the received audio signal may be used without removing effects of the channel and/or noise from the received audio signal. In particular, this may be done in a situation where it is known that the channel is approximately ideal, or where it is known that the system is in an environment in which there is a low level of background noise. The effects of the channel and/or noise can then be removed from the input signal, and the output of the channel/noise compensation block 44 may then be passed to an identification block 46. The identification block 46 may be configured to identify speech content present in at least a portion of the received audio signal. Typically, this involves more than simply detecting the presence of human speech, but means identifying specific speech content. In some embodiments, the identification block 46 is configured to identify at least one test acoustic class in the received audio signal, where an acoustic class is the set of phonemes belonging to the same broad class of phonemes, such as fricatives, vowels, etc. That is, the identification block 46 may be configured to identify the portions of the received audio signal that contain one or more specific test acoustic class.

The at least one test acoustic class may be an acoustic class that comprises certain spectral properties. In other words, the at least one test acoustic class may be chosen to provide a particular power distribution across a particular range of frequencies. For example, the at least one acoustic class may comprise a relatively high level of ultrasonic and/or near ultrasonic frequencies. In some examples, the at least one test acoustic class may comprise one or more specific phonemes. In some examples, the test acoustic class may comprise a set of vowels. In other examples, the test acoustic class may comprise a set of consonants. For example, the at least one test acoustic class may comprise fricatives, and more specifically may comprise sibilants. In another example, the at least one test acoustic class may comprise plosives. It is noted that an audio signal generated by the vocal tract of a human being, in particular when articulating fricatives and sibilant phonemes, contains significant energy in the ultrasound region, above about 20kHz, and even beyond 30kHz. The identification block 46 may be configured to identify parts of the audio signal representing at least one test acoustic class. In some examples, the identification block 46 may be configured to identify parts of the audio signal representing one test acoustic class, out of a plurality of preselected test acoustic classes. In some examples, the identification block 46 may determine the test acoustic class that the received audio signal corresponds to on a frame-by-frame basis. For example, the identification block 46 may determine that a first group of received frames corresponds to a phoneme in the fricative class, and that a second group of received frames corresponds to a phoneme in the plosive class.

The identification of the acoustic class may for example be performed by a trained neural network. Alternatively, the identification of the phonemes contained in the received phrase can be performed by well-known techniques such as Hidden Markov Models.

In some examples, the identification block 46 includes or is associated with an automatic speech recognition block, which can identify the speech content present in at least a portion of the received audio signal. Having identified the speech content, the identification block 46 can for example then identify the portions of the received audio signal that contain the one or more specific test acoustic class.

In some examples, the identification block 46 includes a frame-by-frame estimation of the energy in the near ultra-sound frequencies where the frames with highest energy are associated with fricative phonemes, effectively creating a temporal map of the occurrence of fricative phonemes in the phrase. This temporal map associated with the received audio signal can be aligned to an analogous map previously calculated and stored in the database 48. In text-dependent voice biometrics, the expected temporal mapping of phonemes can be calculated during the enrolment phase when the user creates their biometric voiceprint by uttering a pre-defined passphrase. In text- independent voice biometrics, the mapping can be obtained by means of a phonetic decoder (or acoustic class identifier) applied to the received audio during the authentication attempt.

The alignment between the expected and actual temporal mapping of phonemes can be performed using techniques such as Viterbi algorithm or Dynamic Time Warping, for example.

The spectrum of the portions of the signal thus aligned can be compared to the spectrum of the corresponding acoustic classes. Furthermore, these alignment techniques can provide a measure of the distance between the temporal map of fricatives in the received signal and the expected one. A distance that exceeds a given threshold, meaning that the ultrasound components of the received signal do not match the high-frequency phonetic content of the expected speech, may be indicative of a spoof attack.

For example, in some embodiments of the method, when applied in a smartphone, smart speaker, or the like, the smartphone or smart speaker is activated by an enrolled user speaking a predetermined pass phrase, and so the device is able to recognise an audio signal that contains the pass phrase. For example, the pass phrase may be“Hi assistant”.

The vowel sound in the word“Hi” naturally contains higher frequency components than many vowels. Similarly, the sibilant consonants contain a relatively large amount of high frequency components. The result is that the identification block 46 can determine which portion of the audio signal containing the pass phrase, i.e. which frames of the audio signal, will contain the phonemes with a high proportion of high frequency components. In effect, a map of the temporal positions of the fricative and/or sibilant phonemes within the pass phrase can be created. Thus, the specific speech content in these portions of the audio signal can be identified.

For example, if the pass phrase occupies 1 second of the audio signal, the frames containing the vowel sound in the word“Hi” may appear in the portion of the audio signal between, say, 50-150 milliseconds into the audio signal. Similarly, the sibilant consonants in the word“assistant” may appear in the portion of the audio signal between, say, 550-850 milliseconds into the audio signal.

The frames appearing during these time intervals may therefore be identified.

Thus, in step 62 in the method of Figure 5, the speech content present in at least a portion of the audio signal is identified.

In the example as illustrated in Figure 4, the output of the channel/noise compensation block 44 is passed to the identification block 46. However, it will be appreciated that the received audio signal representing speech may be passed to the identification block 46 without any processing having been previously performed to remove effects of the channel and/or noise. This may occur in a situation where it is known that the channel is approximately ideal, or this may occur in a situation where it is known that the system is in an environment in which there is very low level of background noise. In the example as illustrated in Figure 4, an extracted spectrum is passed to the identification block 46. However, it will be appreciated that the identification block 46 may receive the received audio signal representing speech in an unprocessed form, or a form that remains in the time domain (as opposed to in the frequency domain), and identify the speech content present in at least a portion of the audio signal (for example identifying the at least one acoustic class) from this form of the received audio signal.

A suitably trained neural network may be used for this identification. Having identified the speech content, information is obtained about a frequency spectrum of each portion of the audio signal for which the specific speech content is identified. For example, whereas the spectrum extraction block 42 may be configured to obtain a spectrum of the entire received audio signal, a second spectrum extraction block 47 may be configured to obtain a spectrum of those portions of the received audio signal for which the particular speech content of interest is identified. For example, as described above, the portions of the signal representing the specific speech content with a high proportion of high frequency components may be considered of interest, and the second spectrum extraction block 47 may be configured to obtain a spectrum of the frames of the received audio in which that speech content is identified.

The identification block 46 may transmit an indication of the identified speech content to a database 48. The database 48 may receive the indication of the identified speech content, and supply corresponding stored information about an expected spectrum of the audio signal. For example, where the relevant speech content comprises one or more specific acoustic class, for example one or more phonemes, the database 48 may be configured to store, for each acoustic class, an expected power spectrum of the audio signal that corresponds to that acoustic class. The database 48 may then be configured, for each acoustic class, to retrieve an expected energy spectrum of the audio signal that corresponds to that acoustic class.

Thus, in step 66 in the method of Figure 5, for each portion of the audio signal for which speech content is identified, information about an expected frequency spectrum of the corresponding portion of the audio signal is retrieved. The database 48 may transmit, for each portion of the audio signal for which speech content is identified (that is, for example, for each identified test acoustic class), the retrieved information about an expected spectrum of the audio signal to a comparison block 50.

The comparison block 50 may also receive the spectrum of the frames of the received audio signal in which that same speech content is identified, (for example the or each spectrum of the frames containing the at least one test acoustic class), from the second spectrum extraction block 47.

The comparison block 50 may then compare the received identified parts of the audio signal (representing the at least one test acoustic class) with the received respective retrieved information for the corresponding test acoustic class.

In some examples, the comparison block 50 may compare components of the identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic class in a frequency band in the range of 5-20kHz, or in the range from 16kHz upwards. As described above, some loudspeakers may be unable to reproduce ultrasonic and/or near ultrasonic frequencies well. As a result of this, a received audio signal that comprises a test acoustic class which comprises a relatively high level of ultrasonic and/or near ultrasonic frequencies is likely to be reproduced poorly by a loudspeaker at these frequencies (for example, in a frequency band in the range of 5kHz-20kHz, or in a frequency band in the range above 16kHz). Thus, the spectrum of a received audio signal representing a test acoustic class is likely to differ significantly from the expected spectrum of an audio signal representing a test acoustic class, wherein the test acoustic class comprises a relatively high level of ultrasonic and/or near ultrasonic frequencies, when the received audio signal results from a replay attack. Thus, in order to be able to detect a replay attack using this frequency band, it is preferable for the test acoustic class to comprise a relatively high level of ultrasonic and/or near ultrasonic frequencies, and suitable acoustic classes may for example be fricatives, such as sibilants, and plosives.

In some examples, the comparison block 50 may compare components of the identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic class in a frequency band of 20-200Hz. Some loudspeakers may be unable to reproduce lower frequencies (for example, frequencies in the band of 20- 200Hz) well. As a result of this, a test acoustic class which comprises a relatively high level of these frequencies is likely to be reproduced poorly by a loudspeaker at these frequencies. Thus, the spectrum of a received audio signal representing a test acoustic class is likely to differ significantly from the expected spectrum of an audio signal representing a test acoustic class, wherein the test acoustic class comprises a relatively high level of these lower frequency components, when the received audio signal results from a replay attack. Thus, in order to be able to detect a replay attack using this frequency band, it is preferable for the test acoustic class to comprise a relatively high level of frequencies in the band of 20-200Hz, and suitable acoustic classes may for example be certain vowel sounds. For example, the high back and near-high back rounded vowels represented in the International Phonetic Alphabet by <u> and <0> respectively have high levels of these low frequency components.

The high front unrounded vowel represented in the International Phonetic Alphabet by <i> typically has a relatively low first formant frequency F1 and a relatively high second formant frequency F2, and so portions of speech that contain this vowel sound have relatively high levels of low frequencies in the 20-200Hz band and of high frequencies in the 5kHz-20kHz band. Therefore, if portions of speech that contain this vowel sound are identified, it is useful to compare the frequency spectrum of those portions with the expected frequency spectrum in respective frequency bands in both the 20-200Hz range and the 5kHz-20kHz range.

In some examples, the comparison block 50 may compare a spectrum of the identified parts of the audio signal with a retrieved expected spectrum for the corresponding test acoustic class.

In one example, the comparison block 50 may compare the identified parts of the audio signal, where said identified parts of the audio signal have been obtained from a FFT performed on the audio signal received at the spectrum block 42, with a respective retrieved spectrum for the corresponding test acoustic class. In another example, the comparison block 50 may compare the identified parts of the audio signal, where said identified parts of the audio signal have been obtained from the band-passed audio signal as generated by the spectrum block 42, with a respective retrieved spectrum for the corresponding test acoustic class. In some examples, the comparison block 50 may compare a power level in at least one frequency band of the identified parts of the audio signal with a power level in at least one corresponding frequency band of the expected spectrum of the audio signal. In this example, the measure of the difference between the identified parts of the audio signal and the respective retrieved information for the corresponding test acoustic class may comprise a difference in power.

As explained above, a difference in the power level of the identified parts of the audio signal at a particular frequency (or within a particular frequency range), when compared to the power level of the respective retrieved information for the

corresponding test acoustic class at that frequency (or within that frequency range), may be indicative that the audio signal may result from a replay attack. In some examples, the comparison block may compare a power level in a frequency band in which it may be assumed that a loudspeaker used for a replay attack will have a poor frequency response. The comparison block 50 may compare a power level in a frequency band in the range of 5kHz-20kHz of the identified parts of the audio signal with a power level in the same frequency band in the 5kHz-20kHz frequency range of the expected spectrum of the audio signal. In addition, or alternatively, the comparison block 50 may compare a power level in a frequency band in the range of 20Hz-200Hz of the identified parts of the audio signal with a power level in the same frequency band in the range of 20Hz-200Hz of the expected spectrum of the audio signal. In addition, or alternatively, the comparison block 50 may compare a power level in a frequency band in the range of 20kHz-30kHz of the identified parts of the audio signal with a power level in the same frequency band in the 20kHz-30kHz frequency range of the expected spectrum of the audio signal.

Thus, in step 68 of the method of Figure 5, the frequency spectrum of portions of the audio signal for which speech content is identified is compared with the respective expected frequency spectrum.

The comparison as generated by the comparison block 50 may be transmitted to a decision block 52. The decision block 52 may determine if a measure of a difference between the frequency spectrum of portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level. If the measure of the difference exceeds a threshold level, the decision block 52 may determine that the audio signal may result from a replay attack.

Thus, in step 69 of the method of Figure 5, if a measure of a difference between the frequency spectrum of the portions of the audio signal for which speech content is identified and the respective expected frequency spectrum exceeds a threshold level, it is determined that the audio signal may result from a replay attack.

In some situations, it may be desirable in step 66 of the method to retrieve information about an expected spectrum that represents a specific test acoustic class, where that information is specific to an individual speaker (as opposed to obtaining a spectrum that is representative of the test acoustic class as spoken by a plurality of speakers).

Thus, in some embodiments, the system may perform a speaker identification process on the received audio signal. In some examples, the received audio signal representing speech may undergo a speaker identification process, prior to the retrieving of the information about an expected spectrum of the audio signal from the database 48. The speaker identification process may be performed prior to, or in parallel with, the first two steps of the method of Figure 5. Methods of speaker identification will be well understood by a person skilled in the art.

Following the identification of the speaker who produced the received audio signal representing speech, the obtained speaker identity may also be passed to the database 48.

In some examples, the expected spectrum corresponding to each acoustic class stored in the database 48 will be representative of the acoustic class as spoken by a large cohort of speakers. However, in some examples, the expected spectrum corresponding to each acoustic class stored in the database 48 will be representative of the acoustic class as spoken by a particular individual. Said particular individual may have been identified by the speaker identification process.

Thus, for each test acoustic class, the database 48 may retrieve information about an expected spectrum of the audio signal for a speaker identified by said speaker identification process. For example, there may be a plurality of users enrolled in a system, and each of these plurality of enrolled users may have a model corresponding to their speech stored within the database 48. For each enrolled user, the user’s corresponding model may comprise information about an expected spectrum of the audio signal for a plurality of test acoustic classes for that user.

In an example where there are two users enrolled in a system, there may be information about two expected spectra for each test acoustic class stored within the database 48, where the first expected spectrum corresponds to the first enrolled user, and the second enrolled user corresponds to the second enrolled user. The speaker identification process may identify which of the two enrolled users produced the received audio signal representing speech. The identity of the speaker may then be used by the database 48 to retrieve information about the expected spectrum (for each identified test acoustic class in the audio signal) that corresponds to the identified speaker. This“speaker specific” retrieved information may then be passed to and used by the comparison block 50 in substantially the same manner as described above. As the retrieved information about an expected spectrum of the audio signal will be “speaker specific”, it is likely that the comparison between the identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic class will be more accurate (as both pieces of information being compared are now specific to that speaker). Thus, it is likely that a determination that the audio signal may result from a replay attack will be more accurate as a result.

Figure 7, Figure 8 and Figure 9 illustrate examples of comparisons between identified parts of the audio signal with the respective retrieved information for the corresponding test acoustic classes, in a number of situations in which the audio signal may have resulted from a replay attack. In the following examples, the identified parts of the audio signal representing at least one test acoustic class are power spectra, and the respective retrieved information for the corresponding test acoustic classes are also power spectra.

In Figure 7, Figure 8 and Figure 9, the identified spectra of the received signals are indicated by solid lines, and the expected spectra that have been retrieved from the database are indicated by dashed lines. In Figure 7, it can be seen that, at a particular first frequency (as indicated by h), the identified spectrum 82 and the expected spectrum 84 have a substantially similar power level (as indicated by Pi). As the frequency increases, the expected spectrum and the identified spectrum continue to have a substantially similar power level until a particular second frequency is reached (as indicated by f 2 ). At this point, the expected spectrum 84 remains at a first power level (as indicated by P 2 ), whereas the power level of the identified spectrum 82 rolls-off to a different second power level (as indicated by P 3 ). This roll-off in power level at higher frequencies as seen in the identified spectrum 82, but not seen in the expected spectrum for that specific acoustic class, may be indicative that the received audio signal representing speech may have resulted from a replay attack.

For example, it may be determined that the received audio signal representing speech may have resulted from a replay attack if the power level decreases at a relatively constant rate, such as 6dB per octave, for frequencies above an upper cut-off frequency. The upper cut-off frequency may be in the range 15-25kHz.

In Figure 8, it can be seen that at a particular first frequency (as indicated by T), the identified spectrum 86 and the expected spectrum 88 have significantly different power levels. The power level (as indicated by Pi) at T for the identified spectrum 86 is significantly lower than the power level (as indicated by P 3 ) at T for the expected spectrum 88. As the frequency increases, the power level of the identified spectrum gradually increases, until a second particular frequency (as indicated by f 2 ) is reached. At frequency f 2 , the power levels of the identified 86 spectrum and the expected spectrum 88 (as indicated by P 2 ) are substantially the same. This“roll-off” in power level with decreasing frequency as seen in the identified spectrum, but not seen in the expected spectrum, may be indicative that the received audio signal representing speech may have resulted from a replay attack.

For example, it may be determined that the received audio signal representing speech may have resulted from a replay attack if the power level decreases at a relatively constant rate, such as 6dB per octave, for frequencies below a lower cut-off frequency. The lower cut-off frequency may be in the range 20-200Hz.

In Figure 9, it can be seen that, at frequencies below a particular first frequency (as indicated by T), the power level of the identified spectrum 90 and the expected spectrum 92 is substantially the same (as indicated by Pi). As the frequency increases, the power level of the identified spectrum 90 begins to deviate from the power level of the expected spectrum 92. In this example, the power level of the expected spectrum begins to decrease with increasing frequency at a substantially faster rate than the power level of the identified spectrum. At a second particular frequency (as indicated by f 2 ), the power level of the identified spectrum 90 is at a significantly lower power level (as indicated by P 3 ) than the power level of the expected spectrum 92 (as indicated by P 2 ). This difference in absolute power level at a particular frequency between the identified spectrum and the expected spectrum may be indicative that the received audio signal representing speech may have resulted from a replay attack. In some examples, a difference in absolute power level that exceeds a threshold level may be indicative of a replay attack. For example, the threshold level may be 1dB. Thus, this allows the identification of signals that may result from a replay attack in a more reliable way, by comparing signals from a known acoustic class with an expected spectrum that is specific to that same acoustic class.

Thus, as mentioned above, one way of detecting the limitations of a recording and playback device, such as a smartphone, and therefore of detecting when a detected speech signal might have resulted from a replay attack is to examine the amount of energy present at ultrasonic frequencies. However, the expected amount of energy present at ultrasonic frequencies will depend on the phonemes that are present in the speech.

Thus, some methods disclosed herein relate to identifying the speech content present in at least a portion of the audio signal, and in particular relate to identifying one or more specific phonemes that are present in the speech, and then obtaining information about a frequency spectrum of those portions of the audio signal.

One example of such a method is to measure the average amount of energy present at ultrasonic frequencies during each frame that contains fricative phonemes (or more generally during each frames that contains unvoiced speech), and to compare this to the average amount of energy present at ultrasonic frequencies during each frame that contains voiced speech.

Thus ' *' = K8 · where: x 1 is a measure of the liveness of the speech,

E u (f) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain fricative phonemes (or more generally during frames that contain unvoiced speech), and

E u ( v) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain voiced speech.

Thus, a value can be calculated for x 1 , and this can be compared with a suitable threshold, to determine with the required degree of confidence whether the speech signal should be considered as resulting from a replay attack.

Another example of such a method is to measure the average amounts of energy present in multiple different ultrasonic frequency bands during each frame that contains fricative phonemes (or more generally during each frame that contains unvoiced speech), and to compare these to the amounts of energy present in those ultrasonic frequency bands during frames that contain voiced speech.

Thus,

where:

x 2 (b ) is a set of values, obtained by calculating the following ratio across multiple frequency bands,

E b (f ) is a measure of the amount of energy present in one of several ultrasonic frequency bands, during frames that contain fricative phonemes (or more generally during frames that contain unvoiced speech), and

E b ( ) is a measure of the amount of energy present in one of several ultrasonic frequency bands during frames that contain voiced speech.

Thus, a value can be calculated for for each of the several ultrasonic frequency

bands and these values can be combined to form a set of values x 2 (b), which can then be used as a measure of liveness.

A machine learning approach can be suitable for determining whether the calculated values x 2 (b ) are indicative of live speech, or whether the speech signal should be considered as resulting from a replay attack. Another example of such a method is to measure the average amount of energy present at ultrasonic frequencies during each frame that contains fricative phonemes (or more generally during each frame that contain unvoiced speech), and to compare this to the amount of energy present in the audible frequency band during the same frames.

Thus,

where:

x 3 is a measure of the liveness of the speech,

E u (f) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain fricative phonemes (or more specifically during frames that contain sibilant phonemes, or more generally during frames that contain unvoiced speech), and E a (f ) is a measure of the amount of energy present in the audible frequency band during the same frames.

Thus, a value can be calculated for x 3 , and this can be compared with a suitable threshold, to determine with the required degree of confidence whether the speech signal should be considered as resulting from a replay attack.

Another example of such a method is to measure the average amount of energy present at ultrasonic frequencies during each frame that contains fricative phonemes (or more generally during each frame that contains unvoiced speech), and to compare this to the amount of energy present in the audible frequency band during the same frames, and also to measure the amount of energy present at ultrasonic frequencies during frames that contain voiced speech, and to compare this to the amount of energy present in the audible frequency band during the same frames, and then to take the ratio of the two ratios.

Thus,

where:

x 4 is a measure of the liveness of the speech,

E u (f) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain fricative phonemes (or more generally during frames that contain unvoiced speech),

E a (f ) is a measure of the amount of energy present in the audible frequency band during frames that contain fricative phonemes (or more generally during frames that contain unvoiced speech),

E u ( ) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain voiced speech, and

E a ( ) is a measure of the amount of energy present in the audible frequency band during frames that contain voiced speech.

Thus, a value can be calculated for x 4 , and this can be compared with a suitable threshold, to determine with the required degree of confidence whether the speech signal should be considered as resulting from a replay attack.

Another example of such a method is to measure the average amount of energy present at ultrasonic frequencies during each frame that contains fricative phonemes (or more generally during each frame that contains unvoiced speech), and to compare this to the amount of energy present in frames that do not contain speech, which can be regarded as the ultrasonic noise floor.

Thus, x 5 Euif )

( n ) where:

x 5 is a measure of the liveness of the speech,

E u (f) is a measure of the amount of energy present at ultrasonic frequencies during frames that contain fricative phonemes (or more generally during frames that contain unvoiced speech), and

E u (n) is a measure of the amount of energy present in non-speech frames.

Thus, a value can be calculated for x 5 , and this can be compared with a suitable threshold, to determine with the required degree of confidence whether the speech signal should be considered as resulting from a replay attack. The skilled person will recognise that some aspects of the above-described apparatus and methods may be embodied as processor control code, for example on a non- volatile carrier medium such as a disk, CD- or DVD-ROM, programmed memory such as read only memory (Firmware), or on a data carrier such as an optical or electrical signal carrier. For many applications embodiments of the invention will be

implemented on a DSP (Digital Signal Processor), ASIC (Application Specific

Integrated Circuit) or FPGA (Field Programmable Gate Array). Thus the code may comprise conventional program code or microcode or, for example code for setting up or controlling an ASIC or FPGA. The code may also comprise code for dynamically configuring re-configurable apparatus such as re-programmable logic gate arrays. Similarly the code may comprise code for a hardware description language such as Verilog TM or VHDL (Very high speed integrated circuit Hardware Description

Language). As the skilled person will appreciate, the code may be distributed between a plurality of coupled components in communication with one another. Where appropriate, the embodiments may also be implemented using code running on a field- (re)programmable analogue array or similar device in order to configure analogue hardware.

Note that as used herein the term module shall be used to refer to a functional unit or block which may be implemented at least partly by dedicated hardware components such as custom defined circuitry and/or at least partly be implemented by one or more software processors or appropriate code running on a suitable general purpose processor or the like. A module may itself comprise other modules or functional units. A module may be provided by multiple components or sub-modules which need not be co-located and could be provided on different integrated circuits and/or running on different processors. Embodiments may be implemented in a host device, especially a portable and/or battery powered host device such as a mobile computing device for example a laptop or tablet computer, a games console, a remote control device, a home automation controller or a domestic appliance including a domestic temperature or lighting control system, a toy, a machine such as a robot, an audio player, a video player, or a mobile telephone for example a smartphone. It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. The word “comprising” does not exclude the presence of elements or steps other than those listed in a claim,“a” or“an” does not exclude a plurality, and a single feature or other unit may fulfil the functions of several units recited in the claims. Any reference numerals or labels in the claims shall not be construed so as to limit their scope.