Audio
DPYAUDIOTOOL Linux Programmer's Manual DPYAUDIOTOOL DESCRIPTION dpyaudiotool : Tool used to operate with the system audio. SYNOPSIS dpyaudiotool [-h/ --help] dpyaudiotool [-tv / --toolversion] dpyaudiotool [-gp / --getports] dpyaudiotool [-gt / --gettasks] dpyaudiotool [-gc / --getconnections] dpyaudiotool [-ap / --addport] <portClient:portName> <portType> dpyaudiotool [-rp / --removeport] <portClient:portName> dpyaudiotool [-c / --connect] <connectionId> <originPortClient:originPortName> <destinationPortClient:destinationPortName> [priority] [volume] [gain] dpyaudiotool [-rc / --removeconnection] <connectionId> dpyaudiotool [-p / --play] <portClient:portName> <audioFilePath> [configs] dpyaudiotool [-r / --record] <portClient:portName> <outputFile> [configs] dpyaudiotool [-scv / --setconnectionvolume] <connectionId> <volume> dpyaudiotool [-scg / --setconnectiongain] <connectionId> <gain> dpyaudiotool [-st / --stoptask] <recordId> dpyaudiotool [-gs / --getstatus] <taskId> dpyaudiotool [-co / --getconfiguration] dpyaudiotool [-sc / --setconfig] <parameter> <value> dpyaudiotool [-e / --events] dpyaudiotool [ -spg / --setportgpio] <portClient:portName> <gpio_id> dpyaudiotool [ -upg / --unsetportgpio] <portClient:portName> dpyaudiotool [ -gpg / --getportgpio] OPTIONS -h / --help : Print help command information. -tv / --toolversion : Print tool version. -gp / --getports : Get current audio ports in the system. -gt / --gettasks : Get all tasks sent information. -gc / --getconnections : Get user connections created by the user. -ap / --addport <portClient:portName> <portType>: Create a user defined port to be able to play a audio track or capture audio. Description: <portClient:portName> : Port full name, used to identify it. <portType> : Value defining the behaviour of the port and its purpose. Possible values are: OUTPUT : Used for playing. Need to be connected to an input to hear the sound via that source. INPUT : Used for capture -rp / --removeport <portClient:portName> : Delete a specific user defined port. Description: <portClient:portName> : Port full name, used to identify it. -c / --connect <connectionId> <originPortClient:originPortName> <destinationPortClient:destinationPortName> [priority] [volume] [gain]: Connect a existing output port with another specific input port. Description: <connectionId> : Used to identify the connection between the two ports. <originPortClient:originPortName> : Origin port full name, must be an output. A example could be "user:my_port" <destinationPortClient:destinationPortName> : Destination port full name, must be an input. A example could be "internal_speaker:playback_1" [priority] : [Optional] Connection priority between 0-100. 0 highest priority (0 default) [volume] : [Optional] Volume of the connection (0-100). A example could be "50" [gain] : [Optional] Gain of the connection (0-100). A example could be "50" -rc / --removeconnection <connectionId> : Delete a connection created by the user identified by an unique ID. -p / --play <portClient:portName> <audioFilePath> [configs]: Play an audio file located in the path specified. WAV format is supported. Further information can be found at documentation webpage. Description: <portClient:portName> : User Output Port full name, will be used to identify it. <audioFilePath> : Absolute path where the audio file to play is located. [configs]: optional, specific configuration for current play task. Admits several configuration parameters in {Parameter Value} format. . If not set, will take default values Parameter: VOLUME: play volume (0-100) -r / --record : <portClient:portName> <outputFile> [configs] : Record from a microphone and save it to a file. WAV format is supported. A connection from and user input port and a system output port is needed. Further information can be found at documentation webpage. Description: <portClient:portName> : User Input Port full name, will be used to identify it. <outputFile> : Absolute path of a file where the record will be saved. WAV format. [configs]: optional, specific configuration for current record task. Admits several configuration parameters in {Parameter Value} format. If not set, will take default values Parameter: VOLUME: play volume (0-100) -scv / --setconnectionvolume <connectionId> <volume> : Set the volume of a connection specifying its ID. Description: <connectionId> : Connection identifier <volume> : Volume of the connection (0-100). A example could be "50" -scg / --setconnectiongain <connectionId> <gain> : Set the gain of a connection specifying its ID. Description: <connectionId> : Connection identifier <gain> : Gain of the connection (0-100). A example could be "50" -st / --stoptask <taskId>: Stop an active recording/track specifying its ID. Description: <recordingId> : Recording identifier. -gs / --getstatus <taskId> Description: <taskId> : Task identifier -co / --getconfiguration : Get default configuration -sc / --setconfig <parameter> <value> : Set a default configuration parameter Description: <paramater> : Parameter. Valid values [VOLUME] <value> : Value to be set in the configuration (integer) -e / --events : Subscribes to track events (status changes) and to port and connection events (creation, deletion and gpio assignment). -spg / --setportgpio <portClient:portName> <gpio_id> : Assigns a gpio to an INPUT type port (speakers) Description: <portClient:portName> : Port full name, used to identify it. <gpio_id> : Gpio identifier -upg / --unsetportgpio <portClient:portName> : Releases an INPUT type port (speakers) from a gpio Description: <portClient:portName> : Port full name, used to identify it. -gpg / --getportgpio : Shows ports with assigned gpio. EXAMPLES dpyaudiotool --getports dpyaudiotool --gettasks dpyaudiotool --addport "user:output_port" OUTPUT dpyaudiotool --addport "user:input_port" INPUT dpyaudiotool --connect "my_connection" "user:output_port" "internal_speaker_l:playback_1" dpyaudiotool --connect "my_connection" "user:output_port" "internal_speaker_l:playback_1" 75 dpyaudiotool --connect "my_connection" "user:output_port" "internal_speaker_l:playback_1" 75 50 dpyaudiotool --connect "my_connection_micro" "internal_microphone:capture_1" "user:input_port" 75 0 50 dpyaudiotool --removeconnection "my_connection" dpyaudiotool --play "user:output_port" /mntDAT/audioTest.wav dpyaudiotool --play "user:output_port" /mntDAT/audioTest.wav VOLUME 50 dpyaudiotool --record "user:input_port" /mntDAT/recordAudio.wav dpyaudiotool --record "user:input_port" /mntDAT/recordAudio.wav VOLUME 75 dpyaudiotool --setconnectionvolume "my_connection" 90 dpyaudiotool --setconnectiongain "my_connection_micro" 20 dpyaudiotool --getstatus 1 dpyaudiotool --stoptask 1 dpyaudiotool --getconfiguration dpyaudiotool --setconfig VOLUME 50 dpyaudiotool --removeport "user:output_port" dpyaudiotool --setportgpio "internal_speaker_l:playback_1" "DO1" dpyaudiotool --unsetportgpio "internal_speaker_l:playback_1" dpyaudiotool --getportgpio FILES BUGS SEE ALSO AUTHORS Deepsy Team