File size: 389 Bytes
5669b22
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from abc import ABC, abstractmethod


class VADInterface(ABC):
    @abstractmethod
    def detect_speech(self, audio_data: bytes):
        """

        Detect if there is voice activity in the audio data.

        :param audio_data: Input audio data

        :return: Returns a sequence of audio bytes containing human voice if voice activity is detected

        """
        pass