Getting errors when running streaming speech recognition using Speech on MacOS Catalina Public Beta

What should I do if I am getting these errors in the Error Log?


2019-08-13 20:23:33.695075-0500 Test1234[13048:343089] Metal API Validation Enabled
2019-08-13 20:23:37.662001-0500 Test1234[13048:343089] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000237f00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2019-08-13 20:23:38.041097-0500 Test1234[13048:343089]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
2019-08-13 20:23:38.043625-0500 Test1234[13048:343089] [ddagg]        AggregateDevice.mm:776   couldn't get default input device, ID = 0, err = 0!
2019-08-13 20:23:38.452663-0500 Test1234[13048:343089] [avae]            AVAEInternal.h:76    required condition is false: [AVAudioIONodeImpl.mm:1063:SetOutputFormat: (IsFormatSampleRateAndChannelCountValid(hwFormat))]
2019-08-13 20:23:38.484399-0500 Test1234[13048:343089] [General] required condition is false: IsFormatSampleRateAndChannelCountValid(hwFormat)
2019-08-13 20:23:38.566293-0500 Test1234[13048:343089] [General] (
  0   CoreFoundation                      0x00007fff31678183 __exceptionPreprocess + 250
  1   libobjc.A.dylib                     0x00007fff67b82b64 objc_exception_throw + 48
  2   CoreFoundation                      0x00007fff31693a50 +[NSException raise:format:arguments:] + 88
  3   AVFAudio                            0x00007fff2d1cef87 _Z19AVAE_RaiseExceptionP8NSStringz + 156
  4   AVFAudio                            0x00007fff2d1ceea4 _Z11_AVAE_CheckPKciS0_S0_b + 326
  5   AVFAudio                            0x00007fff2d24f078 _ZN17AVAudioIONodeImpl15SetOutputFormatEmP13AVAudioFormat + 306
  6   AVFAudio                            0x00007fff2d1e7a5f _ZN17AUGraphNodeBaseV318CreateRecordingTapEmjP13AVAudioFormatU13block_pointerFvP16AVAudioPCMBufferP11AVAudioTimeE + 251
  7   AVFAudio                            0x00007fff2d23ee0d _ZN18AVAudioEngineGraph16InstallTapOnNodeEP11AVAudioNodemjP13AVAudioFormatU13block_pointerFvP16AVAudioPCMBufferP11AVAudioTimeE + 389
  8   AVFAudio                            0x00007fff2d25a887 _ZN17AVAudioEngineImpl16InstallTapOnNodeEP11AVAudioNodemjP13AVAudioFormatU13block_pointerFvP16AVAudioPCMBufferP11AVAudioTimeE + 391
  9   AVFAudio                            0x00007fff2d2449fe -[AVAudioNode installTapOnBus:bufferSize:format:block:] + 205
  10  Test1234                            0x0000000100002431 $s8Test123414ViewControllerC24recordAndRecognizeSpeechyyF + 465
  11  Test1234                            0x000000010000217a $s8Test123414ViewControllerC18startButtonPressedyyypF + 58
  12  Test1234                            0x00000001000021d0 $s8Test123414ViewControllerC18startButtonPressedyyypFTo + 80
  13  AppKit                              0x00007fff2eadda14 -[NSApplication(NSResponder) sendAction:to:from:] + 299
  14  AppKit                              0x00007fff2eb3ca18 -[NSControl sendAction:to:] + 86
  15  AppKit                              0x00007fff2eb3c94a __26-[NSCell _sendActionFrom:]_block_invoke + 136
  16  AppKit                              0x00007fff2eb3c84c -[NSCell _sendActionFrom:] + 171
  17  AppKit                              0x00007fff2eb65527 -[NSButtonCell _sendActionFrom:] + 96
  18  AppKit                              0x00007fff2eecb614 NSControlTrackMouse + 1745
  19  AppKit                              0x00007fff2eb3b268 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 130
  20  AppKit                              0x00007fff2eb65290 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 691
  21  AppKit                              0x00007fff2eb3a503 -[NSControl mouseDown:] + 748
  22  AppKit                              0x00007fff2ea2d259 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4907
  23  AppKit                              0x00007fff2e970968 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2612
  24  AppKit                              0x00007fff2e96fcf5 -[NSWindow(NSEventRouting) sendEvent:] + 349
  25  AppKit                              0x00007fff2e831b54 -[NSApplication(NSEvent) sendEvent:] + 352
  26  AppKit                              0x00007fff2e821527 -[NSApplication run] + 707
  27  AppKit                              0x00007fff2e8133de NSApplicationMain + 777
  28  Test1234                            0x00000001000048bd main + 13
  29  libdyld.dylib                       0x00007fff68ed82f5 start + 1
  30  ???                                 0x0000000000000003 0x0 + 3
)


Thank you!


I already set up the Info.plist and put the desired functions and outlets and actions.


Any ideas about an example for an different setups from an iOS version of the same app with the following code?


https://medium.com/ios-os-x-development/speech-recognition-with-swift-in-ios-10-50d5f4e59c48

Replies

Any one with any idea to get this to work?

I don't have an answer, but a couple of things for you to think about:


— You have this log message:


[General] required condition is false: IsFormatSampleRateAndChannelCountValid(hwFormat)


This tends to happen when you connect the output of one node to the input of another node, and the format needs a conversion that can't be done automatically. In the case of input and output nodes in particular, it's possible that connections you make somewhere in the node graph cause the format of the busses of one to change, making it incompatible with the other. The best way to approach this (if this is what's going wrong) is to carefully log all of the formats if the busses you're trying to connect, and make sure they're all compatible.


— You have this log message:


[ddagg]        AggregateDevice.mm:776   couldn't get default input device, ID = 0, err = 0!


I don't have any details about this, but I think AVAudioEngine has only very limited support for aggregate devices. You should probably try to first get things working without trying to use an aggregate device (if that's what you're doing).