Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

2.0 KB
Raw Blame
# linux headless audio devices (installed to
# /etc/pipewire/pipewire.conf.d/). No hardware exists in a sandbox, so the
# graph is driven by PipeWire's dummy driver and these virtual nodes:
#
#   cua_desktop  Audio/Sink (default sink). Everything apps play lands here;
#                desktop audio is captured from its monitor,
#                `cua_desktop.monitor` (pulse name) -- what cua-spacesd
#                streams as the desktop audio track.
#   cua_mic      Audio/Source (default source): the uplink microphone apps
#                record from. It is the far end of a loopback whose near end
#                is the sink `cua_mic_in`, so feeding the mic is just playing
#                into a sink with any Pulse/PipeWire client
#                (`pacat --device=cua_mic_in`, the spacesd's uplink stream).
context.objects = [
    {   factory = adapter
        args = {
            factory.name     = support.null-audio-sink
            node.name        = "cua_desktop"
            node.description = "CUA desktop audio"
            media.class      = "Audio/Sink"
            audio.position   = [ FL FR ]
            audio.rate       = 48000
            priority.session = 2000
            priority.driver  = 2000
            monitor.channel-volumes = true
            object.linger    = true
        }
    }
]

context.modules = [
    {   name = libpipewire-module-loopback
        args = {
            node.description = "CUA virtual microphone"
            audio.position   = [ FL FR ]
            capture.props = {
                node.name        = "cua_mic_in"
                node.description = "CUA microphone feed (uplink input)"
                media.class      = "Audio/Sink"
                priority.session = 100
                object.linger    = true
            }
            playback.props = {
                node.name        = "cua_mic"
                node.description = "CUA virtual microphone"
                media.class      = "Audio/Source"
                priority.session = 2000
                object.linger    = true
            }
        }
    }
]