Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
python.pvrecorder.PvRecorder Class Reference
Inheritance diagram for python.pvrecorder.PvRecorder:
Inheritance graph
[legend]

Classes

class  CPvRecorder
 
class  PvRecorderStatuses
 

Public Member Functions

def __init__ (self, device_index, frame_length, buffer_size_msec=1000, log_overflow=True)
 
def __init__ (self, device_index, frame_length, buffer_size_msec=1000, log_overflow=True)
 
def __init__ (self, device_index, frame_length, buffer_size_msec=1000, log_overflow=True)
 
def delete (self)
 
def delete (self)
 
def delete (self)
 
def read (self)
 
def read (self)
 
def read (self)
 
def selected_device (self)
 
def selected_device (self)
 
def selected_device (self)
 
def start (self)
 
def start (self)
 
def start (self)
 
def stop (self)
 
def stop (self)
 
def stop (self)
 
def version (self)
 
def version (self)
 
def version (self)
 

Static Public Member Functions

def get_audio_devices ()
 
def get_audio_devices ()
 
def get_audio_devices ()
 

Static Private Member Functions

def _lib_path ()
 
def _lib_path ()
 
def _lib_path ()
 

Private Attributes

 _delete_func
 
 _frame_length
 
 _get_selected_device_func
 
 _handle
 
 _read_func
 
 _start_func
 
 _stop_func
 
 _version_func
 

Static Private Attributes

 _LIBRARY = cdll.LoadLibrary(_lib_path.__func__())
 
 _PVRECORDER_STATUS_TO_EXCEPTION
 

Detailed Description

A cross platform Python SDK for PvRecorder to process audio recordings. It lists the available
input devices. Also given the audio device index and frame_length, processes the frame and runs
a callback each time a frame_length is given.

Definition at line 20 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

Constructor & Destructor Documentation

◆ __init__() [1/3]

def python.pvrecorder.PvRecorder.__init__ (   self,
  device_index,
  frame_length,
  buffer_size_msec = 1000,
  log_overflow = True 
)
Constructor

:param device_index: The device index of the audio device to use. A (-1) will choose default audio device.
:param frame_length: The length of the frame to receive at each read call.
:param buffer_size_msec: Time in milliseconds indicating the total amount of time to store audio frames.
:param log_overflow: Boolean variable to indicate to log overflow warnings. A log warning should indicate
read is not being called fast enough from the callers point.

Definition at line 52 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ __init__() [2/3]

def python.pvrecorder.PvRecorder.__init__ (   self,
  device_index,
  frame_length,
  buffer_size_msec = 1000,
  log_overflow = True 
)
Constructor

:param device_index: The device index of the audio device to use. A (-1) will choose default audio device.
:param frame_length: The length of the frame to receive at each read call.
:param buffer_size_msec: Time in milliseconds indicating the total amount of time to store audio frames.
:param log_overflow: Boolean variable to indicate to log overflow warnings. A log warning should indicate
read is not being called fast enough from the callers point.

Definition at line 52 of file pvrecorder/sdk/python/pvrecorder.py.

◆ __init__() [3/3]

def python.pvrecorder.PvRecorder.__init__ (   self,
  device_index,
  frame_length,
  buffer_size_msec = 1000,
  log_overflow = True 
)
Constructor

:param device_index: The device index of the audio device to use. A (-1) will choose default audio device.
:param frame_length: The length of the frame to receive at each read call.
:param buffer_size_msec: Time in milliseconds indicating the total amount of time to store audio frames.
:param log_overflow: Boolean variable to indicate to log overflow warnings. A log warning should indicate
read is not being called fast enough from the callers point.

Definition at line 52 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

Member Function Documentation

◆ _lib_path() [1/3]

def python.pvrecorder.PvRecorder._lib_path ( )
staticprivate
A helper function to get the library path.

Definition at line 177 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ _lib_path() [2/3]

def python.pvrecorder.PvRecorder._lib_path ( )
staticprivate
A helper function to get the library path.

Definition at line 177 of file pvrecorder/sdk/python/pvrecorder.py.

◆ _lib_path() [3/3]

def python.pvrecorder.PvRecorder._lib_path ( )
staticprivate
A helper function to get the library path.

Definition at line 177 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ delete() [1/3]

def python.pvrecorder.PvRecorder.delete (   self)
Releases any resources used by PV_Recorder.

Definition at line 104 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ delete() [2/3]

def python.pvrecorder.PvRecorder.delete (   self)
Releases any resources used by PV_Recorder.

Definition at line 104 of file pvrecorder/sdk/python/pvrecorder.py.

◆ delete() [3/3]

def python.pvrecorder.PvRecorder.delete (   self)
Releases any resources used by PV_Recorder.

Definition at line 104 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ get_audio_devices() [1/3]

def python.pvrecorder.PvRecorder.get_audio_devices ( )
static
Gets the audio devices currently available on device.

:return: A list of strings, indicating the names of audio devices.

Definition at line 147 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ get_audio_devices() [2/3]

def python.pvrecorder.PvRecorder.get_audio_devices ( )
static
Gets the audio devices currently available on device.

:return: A list of strings, indicating the names of audio devices.

Definition at line 147 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ get_audio_devices() [3/3]

def python.pvrecorder.PvRecorder.get_audio_devices ( )
static
Gets the audio devices currently available on device.

:return: A list of strings, indicating the names of audio devices.

Definition at line 147 of file pvrecorder/sdk/python/pvrecorder.py.

◆ read() [1/3]

def python.pvrecorder.PvRecorder.read (   self)
Reads audio frames and returns a list containing the audio frames.

Definition at line 123 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ read() [2/3]

def python.pvrecorder.PvRecorder.read (   self)
Reads audio frames and returns a list containing the audio frames.

Definition at line 123 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ read() [3/3]

def python.pvrecorder.PvRecorder.read (   self)
Reads audio frames and returns a list containing the audio frames.

Definition at line 123 of file pvrecorder/sdk/python/pvrecorder.py.

◆ selected_device() [1/3]

def python.pvrecorder.PvRecorder.selected_device (   self)
Gets the current selected device.

Definition at line 133 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ selected_device() [2/3]

def python.pvrecorder.PvRecorder.selected_device (   self)
Gets the current selected device.

Definition at line 133 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ selected_device() [3/3]

def python.pvrecorder.PvRecorder.selected_device (   self)
Gets the current selected device.

Definition at line 133 of file pvrecorder/sdk/python/pvrecorder.py.

◆ start() [1/3]

def python.pvrecorder.PvRecorder.start (   self)
Starts recording audio.

Definition at line 109 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ start() [2/3]

def python.pvrecorder.PvRecorder.start (   self)
Starts recording audio.

Definition at line 109 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ start() [3/3]

def python.pvrecorder.PvRecorder.start (   self)
Starts recording audio.

Definition at line 109 of file pvrecorder/sdk/python/pvrecorder.py.

◆ stop() [1/3]

def python.pvrecorder.PvRecorder.stop (   self)
Stops recording audio.

Definition at line 116 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ stop() [2/3]

def python.pvrecorder.PvRecorder.stop (   self)
Stops recording audio.

Definition at line 116 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ stop() [3/3]

def python.pvrecorder.PvRecorder.stop (   self)
Stops recording audio.

Definition at line 116 of file pvrecorder/sdk/python/pvrecorder.py.

◆ version() [1/3]

def python.pvrecorder.PvRecorder.version (   self)
Gets the current version of pv_recorder library.

Definition at line 140 of file rhino/demo/c/pvrecorder/sdk/python/pvrecorder.py.

◆ version() [2/3]

def python.pvrecorder.PvRecorder.version (   self)
Gets the current version of pv_recorder library.

Definition at line 140 of file pvrecorder/sdk/python/pvrecorder.py.

◆ version() [3/3]

def python.pvrecorder.PvRecorder.version (   self)
Gets the current version of pv_recorder library.

Definition at line 140 of file porcupine/demo/c/pvrecorder/sdk/python/pvrecorder.py.

Member Data Documentation

◆ _delete_func

python.pvrecorder.PvRecorder._delete_func
private

◆ _frame_length

python.pvrecorder.PvRecorder._frame_length
private

◆ _get_selected_device_func

python.pvrecorder.PvRecorder._get_selected_device_func
private

◆ _handle

python.pvrecorder.PvRecorder._handle
private

◆ _LIBRARY

python.pvrecorder.PvRecorder._LIBRARY = cdll.LoadLibrary(_lib_path.__func__())
staticprivate

◆ _PVRECORDER_STATUS_TO_EXCEPTION

python.pvrecorder.PvRecorder._PVRECORDER_STATUS_TO_EXCEPTION
staticprivate

◆ _read_func

python.pvrecorder.PvRecorder._read_func
private

◆ _start_func

python.pvrecorder.PvRecorder._start_func
private

◆ _stop_func

python.pvrecorder.PvRecorder._stop_func
private

◆ _version_func

python.pvrecorder.PvRecorder._version_func
private

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


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