Public Member Functions | Private Attributes | List of all members
porcupine_demo_mic.PorcupineDemo Class Reference
Inheritance diagram for porcupine_demo_mic.PorcupineDemo:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, access_key, library_path, model_path, keyword_paths, sensitivities, input_device_index=None, output_path=None)
 
def run (self)
 
def show_audio_devices (cls)
 

Private Attributes

 _access_key
 
 _input_device_index
 
 _keyword_paths
 
 _library_path
 
 _model_path
 
 _output_path
 
 _sensitivities
 

Detailed Description

Microphone Demo for Porcupine wake word engine. It creates an input audio stream from a microphone, monitors it, and
upon detecting the specified wake word(s) prints the detection time and wake word on console. It optionally saves
the recorded audio into a file for further debugging.

Definition at line 23 of file porcupine_demo_mic.py.

Constructor & Destructor Documentation

◆ __init__()

def porcupine_demo_mic.PorcupineDemo.__init__ (   self,
  access_key,
  library_path,
  model_path,
  keyword_paths,
  sensitivities,
  input_device_index = None,
  output_path = None 
)
Constructor.

:param library_path: Absolute path to Porcupine's dynamic library.
:param model_path: Absolute path to the file containing model parameters.
:param keyword_paths: Absolute paths to keyword model files.
:param sensitivities: Sensitivities for detecting keywords. Each value should be a number within [0, 1]. A
higher sensitivity results in fewer misses at the cost of increasing the false alarm rate. If not set 0.5 will
be used.
:param input_device_index: Optional argument. If provided, audio is recorded from this input device. Otherwise,
the default audio input device is used.
:param output_path: If provided recorded audio will be stored in this location at the end of the run.

Definition at line 30 of file porcupine_demo_mic.py.

Member Function Documentation

◆ run()

def porcupine_demo_mic.PorcupineDemo.run (   self)
 Creates an input audio stream, instantiates an instance of Porcupine object, and monitors the audio stream for
 occurrences of the wake word(s). It prints the time of detection for each occurrence and the wake word.

Definition at line 65 of file porcupine_demo_mic.py.

◆ show_audio_devices()

def porcupine_demo_mic.PorcupineDemo.show_audio_devices (   cls)

Definition at line 151 of file porcupine_demo_mic.py.

Member Data Documentation

◆ _access_key

porcupine_demo_mic.PorcupineDemo._access_key
private

Definition at line 48 of file porcupine_demo_mic.py.

◆ _input_device_index

porcupine_demo_mic.PorcupineDemo._input_device_index
private

Definition at line 53 of file porcupine_demo_mic.py.

◆ _keyword_paths

porcupine_demo_mic.PorcupineDemo._keyword_paths
private

Definition at line 51 of file porcupine_demo_mic.py.

◆ _library_path

porcupine_demo_mic.PorcupineDemo._library_path
private

Definition at line 49 of file porcupine_demo_mic.py.

◆ _model_path

porcupine_demo_mic.PorcupineDemo._model_path
private

Definition at line 50 of file porcupine_demo_mic.py.

◆ _output_path

porcupine_demo_mic.PorcupineDemo._output_path
private

Definition at line 55 of file porcupine_demo_mic.py.

◆ _sensitivities

porcupine_demo_mic.PorcupineDemo._sensitivities
private

Definition at line 52 of file porcupine_demo_mic.py.


The documentation for this class was generated from the following file:


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:20