Skip to content

audiomanagement

The module nodes are the building blocks for the flow-based programming. Each node represents a specific task or operation that can be performed by the module. The following table lists the available nodes for this module.

Play an audio file on the device.

  • Name: AudioPlay
  • Tags: audio, play, playback, sound, speaker, output
  • Category: Action
  • Subcategory: Audio > Play

This node plays an audio file on the device’s default audio output. It is useful for playing back recorded audio, sound effects, or music files as part of an application or system functionality. The node requires the file path of the audio to be played, allowing for dynamic selection of audio content. Once triggered, the node will play the audio file through the device’s audio output system, providing audible feedback or entertainment to users.

Inputs: (1)

  • Filepath : The file path of the audio file to be played. This specifies the location of the audio content to be played back.

No configuration required for this node.

Record an audio file on the device.

  • Name: AudioRecord
  • Tags: audio, record, recording, sound, microphone, capture
  • Category: Action
  • Subcategory: Audio > Record

This node records an audio file on the device based on the provided configuration. It is essential for capturing audio input for various applications, such as voice commands, audio logging, or sound analysis. The node allows integration into systems that require audio data, whether for user interaction, real-time analysis, or archiving purposes. The recording parameters, such as duration and format, are configured through the AudioRecordingParameters. Once triggered, the recording will start, and the file path of the saved audio will be output for further processing or storage.

Inputs: (1)

  • StartRecording : A boolean trigger to start the recording process. When set to true, the node begins recording audio based on the configured parameters.
  • Filepath : The file path where the recorded audio is stored. This can be used for accessing or processing the audio file.

The following configuration parameters can be set for this node:

Terminal window
AudioRecordingParameters: {
# The duration of the recording in seconds. Allowed range: [1, 3600]. Default is 3 seconds.
duration: int32,
# The file format for saving the recording. Default is "flac".
file_extension: string,
# The number of audio channels for the recording. Allowed range: [1, 16]. Default is 1.
channels: int32,
# The sample rate of the recording in Hz. Allowed values: [8000, 16000, 32000, 44100, 48000]. Default is 16000.
sample_rate: int32,
# The base name of the recorded audio file. Default is "record" (no extension).
file_name: string,
# The bit depth for the recording. Allowed values: [8, 16, 24, 32]. Default is 16.
resolution_bits: int32,
# The volume of the filter in dB. Default is 0. Allowed range: [-20, 20]
filter_volume: int32,
# The high-pass filter frequency in Hz. Default is 0.
filter_high_pass: int32,
# Whether to append a timestamp to the file name. Default is true.
add_timestamp: bool,
# The folder where the recordings will be saved. Default is `~/conhive/audiomanagement/recordings`.
save_folder: string,
# The device name to be used for recording. If empty, the default device is used.
device: string,
}

Speaker test node to verify sound output functionality.

  • Name: TestSpeaker
  • Tags: audio, generator, test, speaker, sound, diagnostics, output
  • Category: Action
  • Subcategory: Audio > Speakertest

This node plays a test sound on the device’s default speaker, helping to verify that the audio output system is functioning correctly. It can be used in troubleshooting or as part of system diagnostics to ensure that the sound hardware is properly configured and working. The test is triggered by a boolean input, allowing it to be easily integrated into automated workflows for audio testing.

Inputs: (1)

  • Trigger StartTest : A boolean trigger to start the speaker test. When true, the node will emit a test sound through the default audio output.

The following configuration parameters can be set for this node:

Terminal window
SpeakerTest: {
# The volume of the speaker.
volume: int32,
# The duration of the speaker test.
loops: int32,
# The name or part of the name of the card. If empty, the default card is used. like "SoundBar"
card_name: string,
# The number of channels.
channels: int32,
# Device name like "hw:CARD=SoundBar"
device_name: string,
}