"Read Failed" when capturing audio on linux (ReSpeaker Core V2)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 574
- Forks
- 104
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
Hi,
I´m trying to get audio capture working on a ReSpeaker Core V2 (http://wiki.seeedstudio.com/ReSpeaker_Core_v2.0/) on Linux. But when I start my sample on linux I get an Error "Read failed"... at first I thought "plughw:0,0" would be wrong, but using anything other than that device name results in error that (more or less) clearly reads like "unknown device". So I think the problem is somewhere else..
Perhaps this will help (result from arecord -l):
**** List of CAPTURE Hardware Devices ****
card 0: seeed8micvoicec [seeed-8mic-voicecard], device 0: 100b0000.i2s1-ac108-pcm0 ac108-pcm0-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
When I use "hw0,0" as device name I get the following error:
Unhandled exception. System.ArgumentException: Hardware params set channels failed.
at Microsoft.Psi.Audio.LinuxAudioInterop.Open(String name, Mode mode, Int32 rate, Int32 channels, Format format, Access access)
at Microsoft.Psi.Audio.AudioCapture.Start(Action`1 notifyCompletionTime)
at Microsoft.Psi.Executive.PipelineElement.b__44_0()
at Microsoft.Psi.Scheduling.Scheduler.ExecuteAndRelease(SynchronizationLock synchronizationObject, Action action, SchedulerContext context)
at Microsoft.Psi.Scheduling.Scheduler.Run(Object workItem)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Thanks for your help
Carl
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Microsoft.Psi.Audio.LinuxAudioInterop.Open and AudioCapture.Start, using the reported arecord -l output and the ReSpeaker Core V2 setup to reproduce the failure. Trace why plughw:0,0 produces “Read failed” and hw0,0 fails while setting channels; done means Linux capture starts successfully on this hardware.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, linux
- Domain
- audio-video-rtc, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100