Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DETECTION OF LOUDSPEAKER PLAYBACK
Document Type and Number:
WIPO Patent Application WO/2019/097216
Kind Code:
A1
Abstract:
A method of determining whether a sound has been generated by a loudspeaker comprises receiving an audio signal representing at least a part of the sound. The audio signal is separated into different frequency bands. The signal content of different frequency bands are compared. Based on said comparison, frequency-based variations in signal content indicative of use of a loudspeaker are identified.

Inventors:
LESSO JOHN PAUL (GB)
Application Number:
PCT/GB2018/053274
Publication Date:
May 23, 2019
Filing Date:
November 13, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
CIRRUS LOGIC INT SEMICONDUCTOR LTD (GB)
International Classes:
H04R29/00; G10L17/00; G10L25/60
Other References:
JESUS VILLALBA ET AL: "Preventing replay attacks on speaker verification systems", SECURITY TECHNOLOGY (ICCST), 2011 IEEE INTERNATIONAL CARNAHAN CONFERENCE ON, IEEE, 18 October 2011 (2011-10-18), pages 1 - 8, XP032069118, ISBN: 978-1-4577-0902-9, DOI: 10.1109/CCST.2011.6095943
LANTIAN LI ET AL: "A Study on Replay Attack and Anti-Spoofing for Automatic Speaker Verification", INTERSPEECH 2017, 1 January 2017 (2017-01-01), ISCA, pages 92 - 96, XP055541809, DOI: 10.21437/Interspeech.2017-456
ZHI LI ET AL: "Compensation of Hysteresis Nonlinearity in Magnetostrictive Actuators With Inverse Multiplicative Structure for Preisach Model", IEEE TRANSACTIONS ON AUTOMATION SCIENCE AND ENGINEERING, vol. 11, no. 2, 1 April 2014 (2014-04-01), US, pages 613 - 619, XP055540966, ISSN: 1545-5955, DOI: 10.1109/TASE.2013.2284437
Attorney, Agent or Firm:
HASELTINE LAKE LLP (GB)
Download PDF:
Claims:
CLAIMS

1. A method of determining whether a sound has been generated by a loudspeaker, the method comprising:

receiving an audio signal representing at least a part of the sound;

separating the audio signal into different frequency bands;

comparing signal content of different frequency bands; and

based on said comparison, identifying frequency-based variations in signal content indicative of use of a loudspeaker.

2. A method according to claim 1 , wherein the step of comparing signal content of different frequency bands comprises:

performing statistical analysis of signal content of different frequency bands to generate statistical metric, and comparing statistical metric for different frequency bands.

3. A method according to claim 1 or 2, further comprising:

if variations in signal content indicative of use of a loudspeaker are identified, generating a loudspeaker indication output signal.

4. A method according to claim 1 , 2 or 3, comprising attempting to detect in the received audio signal features resulting from a non-linearity that is greater at first audio frequencies than at second audio frequencies by:

separating the received audio signal into a first audio frequency component and a second audio frequency component; and

analysing the first audio frequency component and the second audio frequency component.

5. A method according to claim 4, comprising:

analysing the first audio frequency component and the second audio frequency component to obtain respective metrics; and

comparing said metrics to identify features resulting from a non-linearity that is greater at first audio frequencies than at second audio frequencies.

6. A method according to claim 4 or 5, wherein analysing at least one of the first audio frequency component and the second audio frequency component comprises obtaining a statistical metric relating to sample values of the respective component.

7. A method according to claim 6, wherein the statistical metric is a measure of an asymmetry of a waveform of the sound.

8. A method according to claim 6, wherein the statistical metric is a measure of skew of the sample values.

9. A method according to claim 8, wherein the measure of skew is a Pearson coefficient of skewness; a non-parametric skew; or a quartile skewness coefficient.

10. A method according to claim 8 or 9, when dependent on claim 5, comprising: obtaining a measure of skew of sample values of the first audio frequency component;

obtaining a measure of skew of sample values of the second audio frequency component; and

determining that the received audio signal has features resulting from a non linearity that is greater at first audio frequencies than at second audio frequencies, if a ratio of the measure of skew of sample values of the first audio frequency component to the measure of skew of sample values of the second audio frequency component exceeds a threshold value.

11. A method according to claim 10, comprising setting the threshold value.

12. A method according to claim 10, wherein the received audio signal represents speech, the method comprising setting the threshold value based on an assumed identify of a speaker.

13. A method according to claim 10, comprising setting the threshold value based on a level of the received signal.

14. A method according to claim 8 or 9, when dependent on claim 5, comprising: obtaining a measure of skew of sample values of the first audio frequency component; obtaining a measure of skew of sample values of the second audio frequency component; and

determining that the received audio signal has features resulting from a non linearity that is greater at first audio frequencies than at second audio frequencies, if a difference between the measure of skew of sample values of the first audio frequency component and the measure of skew of sample values of the second audio frequency component exceeds a threshold value.

15. A method according to one of claims 6 to 14, comprising, before obtaining the statistical metric, removing samples having small sample values.

16. A method according to claim 15, comprising using a non-linear quantiser to remove the samples having small sample values.

17. A method according to one of claims 6 to 14, comprising, before obtaining the statistical metric, applying a non-linear gain to the sample values.

18. A method according to claim 17, wherein the non-linear gain is a compression.

19. A method according to claim 6, wherein obtaining a statistical metric relating to sample values of the respective component comprises a Cumulative Distribution Function relating to sample values of the respective component.

20. A method according to claim 19, wherein comparing signal content of different frequency bands comprises:

comparing each Cumulative Distribution Function with a respective reference Cumulative Distribution Function for the respective component to obtain a measure of a difference therebetween; and

comparing said measures of difference obtained for the respective components.

21. A method according to claim 19, wherein comparing signal content of different frequency bands comprises comparing the Cumulative Distribution Functions relating to the respective components.

22. A method according to any preceding claim, for determining whether sound has been generated by a loudspeaker having a known resonant frequency, the method comprising attempting to detect in the received audio signal features resulting from a non-linearity that is greater at frequencies below the known resonant frequency than at frequencies above the known resonant frequency.

23. A method according to any preceding claim, comprising using a machine learning technique to attempt to detect in the received audio signal the features resulting from a non-linearity that is greater at low audio frequencies than at high audio frequencies.

24. A method according to claim 23 comprising using a neural network for the machine learning technique.

25. A method according to any preceding claim, comprising:

receiving a first signal representing the sound;

deriving from the first signal a second signal representing a part of the sound; and

attempting to detect in the second signal the features resulting from a non linearity that is greater at first audio frequencies than at second audio frequencies.

26. A method according to claim 25, wherein the second signal represents speech.

27. A method according to claim 26, wherein the second signal represents voiced speech.

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

receiving the first signal at a voice activity detector; and

deriving the second signal representing speech only if the voice activity detector detects speech in the first signal.

29. A method according to any preceding claim, for use in a voice biometrics system, further comprising:

determining that the sound may result from a replay attack on the voice biometrics system, if it is determined that the sound was generated by a loudspeaker.

30. A method according to claim 29, comprising:

passing the received audio signal to a voice biometric processing module only if it is determined that the sound was not generated by a loudspeaker.

31 . A system for determining whether a sound has been generated by a

loudspeaker, the system comprising an input for receiving an audio signal representing at least a part of the sound; and a processor, and the system being configured for: receiving the audio signal representing at least a part of the sound;

separating the audio signal into different frequency bands;

comparing signal content of different frequency bands;

based on said comparison, identifying frequency-based variations in signal content indicative of use of a loudspeaker.

32. A device comprising a system as claimed in claim 31 .

33. A device as claimed in claim 32, wherein the device comprises 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.

34. A computer program product, comprising a computer-readable tangible medium, and instructions for performing a method according to any one of claims 1 to 30.

35. A non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to any one of claims 1 to 30.

36. A device comprising the non-transitory computer readable storage medium as claimed in claim 35.

37. A device as claimed in claim 36, wherein the device comprises 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.

38. A method of determining whether a sound has been generated by a loudspeaker, the method comprising:

receiving an audio signal representing the sound; attempting to detect in the received audio signal features resulting from a non linearity that is characteristic of a loudspeaker; and

if said features are detected, determining that the sound was generated by a loudspeaker.

Description:
DETECTION OF LOUDSPEAKER PLAYBACK

Technical Field

Embodiments described herein relate to methods and devices for detecting when a signal has been played through a loudspeaker.

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 non- registered 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 determining whether a sound has been generated by a loudspeaker, the method comprising:

receiving an audio signal representing at least a part of the sound;

separating the audio signal into different frequency bands;

comparing signal content of different frequency bands; and

based on said comparison, identifying frequency-based variations in signal content indicative of use of a loudspeaker.

According to an aspect of the present invention, there is provided a method of determining whether a sound has been generated by a loudspeaker, the method comprising: receiving an audio signal representing the sound;

attempting to detect in the received audio signal features resulting from a non linearity that is characteristic of a loudspeaker; and

if said features are detected, determining that the sound was generated by a loudspeaker.

According to another aspect of the present invention, there is provided a system for determining whether a sound has been generated by a loudspeaker, configured for operating in accordance with either of the methods.

According to another aspect of the present invention, there is provided a device comprising such a system. The device may comprise 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.

According to another aspect of the present invention, there is provided a computer program product, comprising a computer-readable tangible medium, and instructions for performing a method according to the first aspect.

According to another aspect of the present invention, there is provided a non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to the first 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 illustrates a situation in which a replay attack is being performed; Figure 4 illustrates a characteristic of a loudspeaker;

Figure 5 is a flow chart illustrating a method of analysing an audio signal; Figure 6 is a block diagram illustrating an analysis system;

Figure 7 illustrates in more detail a part of the system of Figure 6; and Figure 8 illustrates an embodiment of the system of Figure 6.

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 a microphone 12 for detecting ambient sounds. In normal use, the microphone is of course used for detecting the speech of a user who is holding the smartphone 10 close to their face.

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.

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.

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-dependent characteristics, and if these frequency-dependent 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.

Although Figure 3 illustrates one possible use of the disclosed method of analysis of an audio signal, the method is applicable more generally to any system in which it is desirable to determine whether a detected sound was played through a loudspeaker. In this example, the method uses the fact that a typical loudspeaker has a non-linearity that is dependent on frequency. This contrasts with, for example, a microphone, which may have a non-linearity that is substantially independent of the frequency.

Figure 4 illustrates the non-linearity characteristic of a typical loudspeaker.

Specifically, Figure 4 shows the variation of the total harmonic distortion (THD) with frequency. At relatively low frequencies, below the resonant frequency f R of the loudspeaker, for example in the range fi to f 2 , the THD is generally constant. The loudspeaker has a large THD at the resonant frequency, and then falls away with increasing frequency, for example for frequencies of f 3 and higher. This non-linearity characteristic can be used to detect when a received sound has been played through a loudspeaker.

Specifically, as the non-linearity characteristic is frequency dependent, the effects of the non-linearity can be detected in different frequency bands, in order to identify whether the received signal results from a sound that has been played through a loudspeaker.

Figure 5 is a flow chart illustrating the method of analysis, and Figure 6 is a block diagram illustrating the basic form of an analysis system.

At step 200 of the method, an audio signal representing a sound is received at an input 220 of the system.

The signal received at the input 22 may be received directly from a microphone such as the microphone 12, or may have been subject to some initial pre-processing. Thus, if a first signal is received representing the sound, a second signal may be derived from the first signal representing a part of the sound. Then the system may attempt to detect in the second signal the features resulting from a non-linearity that is greater at some frequencies than at others. For example, the received signal may be pre-processed so that the second signal represents a speech component of the sound. More specifically, the received signal may be pre-processed so that the second signal represents voiced speech.

The first signal may be received at a voice activity detector, and the second signal may be derived only if the voice activity detector detects speech in the first signal.

At step 202, the received signal is separated into two or more frequency bands. Figure 6 shows the signal being passed to a first filter 222 in the form of a low-pass filter, and also being passed to a second filter 228 in the form of a high-pass filter. Preferably, the cut-off frequency of the low-pass filter is chosen to be below the resonant frequency of any loudspeaker that would be expected to be used. Similarly, preferably the cut-off frequency of the high-pass filter is chosen to be significantly above the resonant frequency of any loudspeaker that would be expected to be used. This will have the effect that the non-linearity of the loudspeaker, and hence the detectable effect on the received signal, will be greater at low audio frequencies than at high audio frequencies.

In other embodiments, the first filter 222 and the second filter 228 are both band-pass filters, with their respective pass bands being chosen so that they are spaced apart, meaning that the non-linearity of the loudspeaker, and hence the detectable effect on the received signal, will be different in the two pass bands.

In other embodiments, more than two filters are provided, and again these may be band-pass filters, with their respective pass bands being spaced apart. The use of three or more frequency bands improves the probability that the non-linearity of the loudspeaker, and hence the detectable effect on the received signal, will be different in the pass bands, even though the aim is to detect the presence of an unknown loudspeaker having a non-linearity characteristic that by definition cannot be known in advance.

Thus, in step 204, the signal content of the different frequency bands is examined. In the example shown in Figure 6, the outputs of the filters 222, 228 are passed to respective non-linearity detector (NLD) blocks 224, 230. Thus, in this example, as shown at step 206, the system attempts to detect in the received audio signal features that result from a non-linearity. More specifically, the system attempts to detect in the received audio signal features that result from a non-linearity that varies with frequency, for example being greater at low audio frequencies than at high audio frequencies.

The Non-Linearity Detectors (NLD) 224, 230 can take many forms, but one effect of non-linearity on a received signal is to increase the asymmetry of the signal. That is, if a signal contains a large number of samples, and the sample values are a mixture of positive and negative values, one effect of the non-linearity will be to introduce new sample values that are the square of values in the input signal. These squared values will all be positive, and so their presence will increase the proportion of positive values in the output of the non-linearity.

Thus, one form of a simple form Non-Linearity Detector (NLD) measures the asymmetry of the wave form in each of the two or more frequency bands selected by the filters 222, 228.

Step 206 of the method may comprise analysing the two or more frequency

components to obtain respective metrics, and then comparing said metrics to identify features resulting from a non-linearity that is greater in one of the frequency bands than the other.

More specifically, analysing the two or more frequency components may comprise obtaining a statistical metric relating to sample values of the respective component. The statistical metric may be a measure of an asymmetry of a waveform of the sound. More specifically, the statistical metric may be a measure of skew of the sample values.

Figure 7 shows one possible implementation of a NLD. In this implementation, an optional non-linear gain is applied to the relevant frequency component of the received signal. The non-linear gain can be compression or, as shown in Figure 7, a non-linear quantiser 240, which acts to remove small-valued samples, so that the larger samples have a greater effect on the subsequent determination. The resulting signal is passed to a block 242 for measuring the skew of the signal in order to obtain a statistical metric for the relevant frequency band. The skew measuring block 242 may for example form as a measure of the skew a Pearson coefficient of skewness; a non-parametric skew; or a quartile skewness coefficient.

The non-parametric skew Sk may be:

where m is the mean of the sample values, v is the median of the sample values, and s is the standard deviation of the sample values.

Alternatively, a non-parametric skew in which the standard deviation is replaced by the mean absolute deviation may be used.

The quartile skewness coefficient Sq may be: where Q1 , Q2, and Q3 are the first, second and third quartile values, respectively.

An alternative form of NLD examines a Cumulative Distribution Function derived from the samples in the respective frequency band.

Figure 8 illustrates the type of Cumulative Distribution Function that is used.

Specifically, Figure 8 shows the Cumulative Distribution Function obtained for a first filter pass band that extends from a lower frequency T to an upper frequency f 2 . For example, the Cumulative Distribution Function may be obtained for the signals that are passed by one of the filters 222, 228. The curve 250 then shows the percentage of the frames in which the fundamental frequency of the signal is lower than the relevant frequency. Thus, by way of illustration, the Cumulative Distribution Function 250 shows that a percentage c 2 of the frames have the fundamental frequency below the frequency f c . In one example, a measure of non-linearity is then obtained by comparing the

Cumulative Distribution Function 250 with a reference Cumulative Distribution Function 252. The reference Cumulative Distribution Function 252 may for example have a Lorentzian distribution.

The comparison between the Cumulative Distribution Function 250 and the reference Cumulative Distribution Function 252 may be achieved by means of a vertical distance calculation. Thus, as mentioned above, the Cumulative Distribution Function 250 shows that a percentage c 2 of the frames have the fundamental frequency below the frequency f c . Similarly, the reference Cumulative Distribution Function 252 shows that a percentage ci of the frames have the fundamental frequency below the frequency f c . Thus, the vertical distance (c 2 - Ci) can be calculated at the frequency f c . The same calculation can be performed for all frequencies within the frequency band that extends from fi to f 2 . This can then be used to form a measure of the non-linearity of the signal within the frequency band from T to f 2 . For example, a metric that represents the non linearity of the signal within the relevant frequency band can be obtained by finding the maximum vertical distance between the Cumulative Distribution Function 250 and the reference Cumulative Distribution Function 252 across the frequency band from T to f 2 .

The same steps can be performed for the signals that are passed by the other one of the filters 222, 228, in order to obtain a statistical metric that represents the non linearity of the signal within the relevant frequency band.

After performing a statistical analysis of the signal content of the different frequency bands to generate respective statistical metrics, in step 208 these metrics are passed to the comparison block 226 shown in Figure 6

The comparison block 226 compares the statistical metrics obtained for the different frequency bands.

For example, if two frequency components are separated by the filters 222, 228, the metrics obtained for these two frequency bands can be compared to obtain a value for the ratio of the two metrics.

That is, if the metric is cp1 for a first frequency band and f2 for a second frequency band, a ratio f 1/f2 can be formed. This ratio can then be compared with one or more threshold value. It can be determined that the signal may have been played through a loudspeaker if the ratio is above an upper threshold and/or if the ratio is below a lower threshold.

If more than two frequency bands are chosen, the metrics for these frequency bands can for example be compared in pairs. That is, if the metric is cp1 for a first frequency band, f2 for a second frequency band and f3 for a third frequency band, three ratios f 1/f2, f 1/f3, and f2/f3 can be formed. These ratio can then all be compared with the one or more threshold value.

If the first frequency band and the second frequency band are chosen such that they are likely to be significantly below the resonant frequency of a loudspeaker and significantly above the resonant frequency of the loudspeaker, then it could be determined that the received audio signal has features resulting from a non-linearity that is greater at low audio frequencies than at high audio frequencies, if a ratio of the measure of skew of sample values of the low audio frequency component to the measure of skew of sample values of the high audio frequency component exceeds a threshold value.

For example, the typical value for the ratio might be 1.5 : 1 . Therefore, to provide a good degree of discrimination, the threshold value for the ratio might be set to be 1.3 : 1.

However, it is also known that speech is typically somewhat asymmetric, and the speech of some speakers is naturally more asymmetric than others. Thus, if the system has access to information about the purported identity of the speaker, as would typically be the case in a speaker verification system for example, the threshold value for the ratio might be adapted to take account of that information. For example, for a speaker with a low degree of natural asymmetry the threshold value for the ratio may be set to a lower value than normal. For a speaker with a high degree of natural asymmetry the threshold value for the ratio may be set to a higher value than normal.

Similarly, the non-linearity will vary with the sound pressure level. The threshold value for the ratio can therefore be adjusted based on the signal level. If the detected sound is quiet, the non-linearity will have a relatively small effect on the received signal, and so it will be advantageous to set a lower than normal threshold value for the ratio. By contrast, if the detected sound is loud, the non-linearity will have a relatively large effect on the received signal, and so it will be possible to set a higher than normal threshold value for the ratio.

Although reference is made here to determining the ratio of the metrics obtained for the different frequency bands, it will be appreciated that it is also possible to form the difference between the metrics (such as the measures of the skew of the sample values of the two frequency component), and to compare this difference with a threshold value.

An embodiment was described above, in which Cumulative Distribution Functions are obtained from the signals in multiple frequency bands, and are compared with respective reference Cumulative Distribution Functions, in order to form respective measures of non-linearity for the frequency bands. These measures of non-linearity for the different frequency bands can then be compared with each other.

A further possibility is to obtain respective Cumulative Distribution Functions from the signals in multiple frequency bands, and to compare those Cumulative Distribution Functions with each other directly in the comparison block 226. For example, the comparison can involve finding a maximum vertical distance between the Cumulative Distribution Functions, as described with reference to Figure 8 and the comparison between a Cumulative Distribution Function and a reference Cumulative Distribution Functions.

If the difference between the Cumulative Distribution Functions relating to the signals in multiple frequency bands (for example expressed in terms of the vertical distance between them) exceeds a threshold value, then this may be used by the comparison block 226 as an indication that the sound was generated by a loudspeaker.

If the comparison block 226 determines that the sound was generated by a

loudspeaker, it generates a loudspeaker indication output signal. This can be supplied to any subsequent processing block, as required. In the case where the analysis is used to determine whether a received audio signal is part of a speaker recognition or speech recognition system, the output signal can be used to control the actions taken by the remainder of that system. For example, in the case of a voice biometrics system, it may be determined that the sound may result from a replay attack on the voice biometrics system, if it is determined that the sound was generated by a loudspeaker. In that case, the received audio signal may be passed to a voice biometric processing module only if it is determined that the sound was not generated by a loudspeaker. Thus, in the speaker recognition system, a decision that the received audio signal contains the speech of an enrolled user can be nullified if the comparison block 226 determines that the received audio signal was generated in response to sound played through a loudspeaker.

Reference was made above to obtaining explicit metrics relating to the two or more frequency bands, and comparing those metrics to identify frequency-based variations in signal content that are indicative of use of a loudspeaker. However, it is also possible to use a machine learning technique to attempt to detect in the received audio signal the features resulting from a non-linearity that varies with frequency, for example being greater at low audio frequencies than at high audio frequencies. The machine learning may for example use a neural network.

The data that is fed to the machine learning technique can for example be the raw frequency data, or can be probability data relating to the signals (for example the cumulative distribution function of the sample values in each of the frequency bands).

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.