Class for detecting spoofing attacks in audio with human speech. This is an entry point for voice antispoofing. AntispoofEngine is thread-safe.  
 More...
#include <voicesdk/antispoof2/antispoof.h>
Class for detecting spoofing attacks in audio with human speech. This is an entry point for voice antispoofing. AntispoofEngine is thread-safe. 
 
◆ create()
Creates AntispoofEngine instance. 
- Parameters
 - 
  
    | initPath | Path to directory containing antispoof.json file or path to custom configuration file (*.json)  | 
  
   
- Returns
 - Smart pointer to created AntispoofEngine instance 
 
- Exceptions
 - 
  
    | std::runtime_error | if runtime error occurred  | 
  
   
 
 
◆ isSpoof() [1/4]
  
  
      
        
          | virtual AntispoofResult voicesdk::AntispoofEngine::isSpoof  | 
          ( | 
          const float *  | 
          floatSamples,  | 
         
        
           | 
           | 
          size_t  | 
          samplesNum,  | 
         
        
           | 
           | 
          int  | 
          sampleRate  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
pure virtual   | 
  
 
Tests whether given audio samples contain spoofed speech 
- Parameters
 - 
  
    | floatSamples | Input audio as a float samples array (in [-1, 1] range)  | 
    | samplesNum | Size of floatSamples array  | 
    | sampleRate | Input audio sample rate  | 
  
   
- Returns
 - AntispoofResult object 
 
- Exceptions
 - 
  
    | std::runtime_error | if runtime error occurred  | 
  
   
 
 
◆ isSpoof() [2/4]
  
  
      
        
          | virtual AntispoofResult voicesdk::AntispoofEngine::isSpoof  | 
          ( | 
          const int16_t *  | 
          pcm16Samples,  | 
         
        
           | 
           | 
          size_t  | 
          samplesNum,  | 
         
        
           | 
           | 
          int  | 
          sampleRate  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
pure virtual   | 
  
 
Tests whether given audio samples contain spoofed speech 
- Parameters
 - 
  
    | pcm16Samples | Input audio as a PCM16 samples array  | 
    | samplesNum | Size of pcm16Samples array  | 
    | sampleRate | Input audio sample rate  | 
  
   
- Returns
 - AntispoofResult object 
 
- Exceptions
 - 
  
    | std::runtime_error | if runtime error occurred  | 
  
   
 
 
◆ isSpoof() [3/4]
  
  
      
        
          | virtual AntispoofResult voicesdk::AntispoofEngine::isSpoof  | 
          ( | 
          const std::string &  | 
          audioFile | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Tests whether given audio file contains spoofed speech. 
- Parameters
 - 
  
    | audioFile | Path to audio file  | 
  
   
- Returns
 - AntispoofResult object 
 
- Exceptions
 - 
  
    | std::runtime_error | if runtime error occurred  | 
  
   
 
 
◆ isSpoof() [4/4]
  
  
      
        
          | virtual AntispoofResult voicesdk::AntispoofEngine::isSpoof  | 
          ( | 
          const uint8_t *  | 
          pcm16Bytes,  | 
         
        
           | 
           | 
          size_t  | 
          bytesNum,  | 
         
        
           | 
           | 
          int  | 
          sampleRate  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
pure virtual   | 
  
 
Tests whether given audio bytes contain spoofed speech 
- Parameters
 - 
  
    | pcm16Bytes | Input audio as a little-endian PCM16 byte array  | 
    | bytesNum | Size of pcm16Bytes  | 
    | sampleRate | Input audio sample rate  | 
  
   
- Returns
 - AntispoofResult object 
 
- Exceptions
 - 
  
    | std::runtime_error | if runtime error occurred  |