Difference between revisions of "IC Python API:RLPy RAudioRecorder"
Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Detailed Description== This class is used for the recording of audio. The functions GetAvailableDevices() can get...") |
Chuck (RL) (Talk | contribs) m |
||
Line 116: | Line 116: | ||
'''RLPy.RStatus.Failure''' Fail | '''RLPy.RStatus.Failure''' Fail | ||
</div> | </div> | ||
+ | ----- | ||
+ | ====UnregisterCallback==== | ||
+ | <syntaxhighlight lang="Python"> | ||
+ | RLPy.RAudioRecorder ( self ) | ||
+ | </syntaxhighlight> | ||
+ | Unregister network audio recorder event callback. |
Revision as of 18:40, 31 March 2019
- Main article: Modules.
Detailed Description
This class is used for the recording of audio.
The functions GetAvailableDevices() can get a list of all available audio devices. Developer can use SetInputDevice() and GetInputDevice() to set/get current recording device.audio_recorder = RLPy.RAudioRecorder()
# If you want to select your recording devices.
all_device = audio_recorder.GetAvailableDevices()
audio_recorder.SetInputDevice(all_device[0])
audio_recorder.Start()
#Recording is now started
#...
audio_recorder.Stop()
recorded_audio = audio_recorder.GetAudio() # RIAudioObject
Member Functions
GetAudio
RLPy.RAudioRecorder.GetAudio ( self )
Returns the recorded audio.
Returns
GetAvailableDevices
RLPy.RAudioRecorder.GetAvailableDevices ( self )
Returns a list of audio devices.
Returns
GetInputDevice
RLPy.RAudioRecorder.GetInputDevice ( self )
Returns current audio input device.
Returns
GetTimeLimit
RLPy.RAudioRecorder.GetTimeLimit ( self )
Get current limit time of Audio Recorder.
Returns
RegisterCallback
RLPy.RAudioRecorder.RegisterCallback ( self, pCallback )
Register audio recorder event callback.
Parameters
pCallback [IN] RAudioRecorderCallback - RLPy.RAudioRecorderCallback
SetInputDevice
RLPy.RAudioRecorder.SetInputDevice ( self, strInputAudioDeviceName )
Select your recording device.
Parameters
strInputAudioDeviceName [IN] Device name - string
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
SetTimeLimit
RLPy.RAudioRecorder.SetTimeLimit ( self, nMillisecond )
Limit recording time for Audio Recorder.
Parameters
nMillisecond [IN] limit of recording time in millisecond - int
Start
RLPy.RAudioRecorder.Start ( self )
Starts recording from the audio input device.
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
Stop
RLPy.RAudioRecorder.Stop ( self )
Stop recording from the audio input device.
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
UnregisterCallback
RLPy.RAudioRecorder ( self )
Unregister network audio recorder event callback.