respeaker / usb_4_mic_array

ReSpeaker 4 Mic Array with builtin VAD, DOA, AEC, Beamforming & NS
https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2.0-p-3053.html
Apache License 2.0
142 stars 66 forks source link

How to get work with Gstreamer pipeline?(macOS Mojave, version: 10.14.5) #30

Open luvwinnie opened 5 years ago

luvwinnie commented 5 years ago

I have a ReSpeaker 4-Mic Array which trying to use in macOS gstreamer pipeline, however, it seems like not working which show as following gstreamer error. I'm using osxaudiosrc for microphone input. this command works with built-in mic , anyone know how to work ReSpeaker with gstreamer?

0:00:01.544372000 73779    0x1041d0800 FIXME                default gstutils.c:3981:gchar *gst_pad_create_stream_id_internal(GstPad *, GstElement *, const gchar *):<osxaudiosrc:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:01.552869000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.553191000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.553443000 73779    0x1041d0800 WARN                GST_PADS gstpad.c:4230:gboolean gst_pad_peer_query(GstPad *, GstQuery *):<osxaudiosrc:src> could not send sticky events
0:00:01.665373000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.665653000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.665999000 73779    0x1041d0800 WARN                 basesrc gstbasesrc.c:3072:void gst_base_src_loop(GstPad *):<osxaudiosrc> error: Internal data stream error.
0:00:01.666010000 73779    0x1041d0800 WARN                 basesrc gstbasesrc.c:3072:void gst_base_src_loop(GstPad *):<osxaudiosrc> error: streaming stopped, reason not-negotiated (-4)
0:00:01.666355000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.666623000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support
0:00:01.666885000 73779    0x1041d0800 WARN           basetransform gstbasetransform.c:1364:gboolean gst_base_transform_setcaps(GstBaseTransform *, GstPad *, GstCaps *):<audioconvert> transform could not transform audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)6, channel-mask=(bitmask)0x0000000000000000 in anything we support

Added Information

When I try the gst-device-monitor-1.0 comand, it only show below but gst-sink but not gst-src

Device found:

    name  : ReSpeaker 4 Mic Array (UAC1.0)
    class : Audio/Sink
    caps  : audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)16000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003;
            audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)2, channel-mask=(bitmask)0x0000000000000003;
            audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)1;
    gst-launch-1.0 ... ! osxaudiosink device=65