Reply To: Words not recognized

Home Forums OpenEars Words not recognized Reply To: Words not recognized

#1030650
bhavin
Participant

Halle, Thank you for your suggestion. I went through the class documentation and also played around with disabling the properties.

It looks like the:

OEPocketsphinxController.sharedInstance().disablePreferredBufferSize = true

is the one that is actually having an effect. I do not disable anything else now and the loudness issue still persists. The volume increases whenever i start the listening.

Function:

func startListening() {
OEPocketsphinxController.sharedInstance().disablePreferredBufferSize = true

do {
try OEPocketsphinxController.sharedInstance().setActive(true)
} catch {
print(error)
}

OEPocketsphinxController.sharedInstance().startListeningWithLanguageModelAtPath(lmPath, dictionaryAtPath: dicPath, acousticModelAtPath: OEAcousticModel.pathToModel(“AcousticModelEnglish”), languageModelIsJSGF: false)
}

Log:

2016-07-01 15:09:37.904 app[5044:1990481] Starting OpenEars logging for OpenEars version 2.502 on 64-bit device (or build): iPhone running iOS version: 9.300000
2016-07-01 15:09:37.922 app[5044:1990481] Starting dynamic language model generation

2016-07-01 15:09:37.996 app[5044:1990481] Done creating language model with CMUCLMTK in 0.073687 seconds.
2016-07-01 15:09:37.997 app[5044:1990481] Since there is no cached version, loading the language model lookup list for the acoustic model called AcousticModelEnglish
2016-07-01 15:09:38.044 app[5044:1990481] I’m done running performDictionaryLookup and it took 0.032958 seconds
2016-07-01 15:09:38.050 app[5044:1990481] I’m done running dynamic language model generation and it took 0.143244 seconds
[app.AudioHandler.AudioEvent(speakMessageType: app.AudioHandler.SpeakMessageType.ConnectionMessage, message: “Copilot connected.”)]
Setting audio timer.
2016-07-01 15:09:38.169 app[5044:1990481] Configuring the default app.
2016-07-01 15:09:38.196: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add “FirebaseAppDelegateProxyEnabled” to your Info.plist and set it to NO
2016-07-01 15:09:38.203: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 “(null)”
2016-07-01 15:09:38.218: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-07-01 15:09:38.229: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add “FirebaseAppDelegateProxyEnabled” to your Info.plist and set it to NO
2016-07-01 15:09:38.327 app[5044:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-07-01 15:09:38.331 app[5044:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2016-07-01 15:09:38.356 app[5044:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-07-01 15:09:38.459 app[5044:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-07-01 15:09:38.562: <FIRInstanceID/WARNING> APNS Environment in profile: development
Audio Session Started.
Removing audio timer.
2016-07-01 15:09:39.240 app[5044:1990655] Building MacinTalk voice for asset: (null)
[app.AudioHandler.AudioEvent(speakMessageType: app.AudioHandler.SpeakMessageType.BatteryNotification, message: “4 and a half hours of talktime remaining.”)]
Setting audio timer.
Audio Session Stopped.
Audio Session Started.
Removing audio timer.
[message: Test142., sender: Bhavin Modi, collapse_key: do_not_collapse, msgid: 376, timestamp: 1467400187730, from: 579452197266]
[app.AudioHandler.AudioEvent(speakMessageType: app.AudioHandler.SpeakMessageType.RemoteNotification, message: “New Message from Bhavin Modi. Test142.”)]
Setting audio timer.
Audio Session Stopped.
Audio Session Started.
Removing audio timer.
Audio Session Stopped.
Audio Session Started.
Record Permission Granted. Starting.
2016-07-01 15:10:01.326 app[5044:1990481] Creating shared instance of OEPocketsphinxController
2016-07-01 15:10:01.329 app[5044:1990481] Attempting to start listening session from startListeningWithLanguageModelAtPath:
2016-07-01 15:10:01.331 app[5044:1990481] User gave mic permission for this app.
2016-07-01 15:10:01.332 app[5044:1990481] setSecondsOfSilence wasn’t set, using default of 0.700000.
2016-07-01 15:10:01.333 app[5044:1990571] Starting listening.
2016-07-01 15:10:01.334 app[5044:1990571] About to set up audio session
2016-07-01 15:10:03.222 app[5044:1990594] Audio route has changed for the following reason:
2016-07-01 15:10:03.226 app[5044:1990571] Creating audio session with default settings.
2016-07-01 15:10:03.227 app[5044:1990571] Done setting audio session category.
2016-07-01 15:10:03.230 app[5044:1990571] Sample rate is already the preferred rate of 16000.000000 so not setting it.
2016-07-01 15:10:03.231 app[5044:1990594] There was a category change. The new category is AVAudioSessionCategoryPlayAndRecord
2016-07-01 15:10:03.248 app[5044:1990571] number of channels is already the preferred number of 1 so not setting it.
2016-07-01 15:10:03.250 app[5044:1990571] Not setting a preferred buffer duration at developer request, keeping the default duration for this hardware of 0.016000.
2016-07-01 15:10:03.251 app[5044:1990571] Done setting up audio session
2016-07-01 15:10:03.256 app[5044:1990571] About to set up audio IO unit in a session with a sample rate of 16000.000000, a channel number of 1 and a buffer duration of 0.016000.
2016-07-01 15:10:03.264 app[5044:1990594] This is not a case in which OpenEars notifies of a route change. At the close of this method, the new audio route will be <Input route or routes: “BluetoothHFP”. Output route or routes: “BluetoothHFP”>. The previous route before changing to this route was “<AVAudioSessionRouteDescription: 0x13007bbb0,
inputs = (
“<AVAudioSessionPortDescription: 0x13126bee0, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = Front>”
);
outputs = (
“<AVAudioSessionPortDescription: 0x13161dbc0, type = BluetoothA2DPOutput; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tacl; selectedDataSource = (null)>”
)>”.
2016-07-01 15:10:03.294 app[5044:1990571] Done setting up audio unit
2016-07-01 15:10:03.337 app[5044:1990571] About to start audio IO unit
2016-07-01 15:10:03.337 app[5044:1990594] Audio route has changed for the following reason:
2016-07-01 15:10:03.341 app[5044:1990571] Done starting audio unit
2016-07-01 15:10:03.347 app[5044:1990594] There was a category change. The new category is AVAudioSessionCategoryPlayAndRecord
2016-07-01 15:10:03.353 app[5044:1990594] This is not a case in which OpenEars notifies of a route change. At the close of this method, the new audio route will be <Input route or routes: “BluetoothHFP”. Output route or routes: “BluetoothHFP”>. The previous route before changing to this route was “<AVAudioSessionRouteDescription: 0x13140d7c0,
inputs = (
“<AVAudioSessionPortDescription: 0x1302f8b60, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = Bottom>”
);
outputs = (
“<AVAudioSessionPortDescription: 0x130222460, type = Receiver; name = Receiver; UID = Built-In Receiver; selectedDataSource = (null)>”
)>”.
2016-07-01 15:10:03.458 app[5044:1990571] Restoring SmartCMN value of 35.950439
2016-07-01 15:10:03.458 app[5044:1990571] Listening.
2016-07-01 15:10:03.459 app[5044:1990571] Project has these words or phrases in its dictionary:
OK
REPEAT
REPEAT(2)
REPLAY

2016-07-01 15:10:03.459 app[5044:1990571] Recognition loop has started
2016-07-01 15:10:03.459 app[5044:1990481] Successfully started listening session from startListeningWithLanguageModelAtPath:
2016-07-01 15:10:03.617 app[5044:1990571] Speech detected…
2016-07-01 15:10:04.597 app[5044:1990814] End of speech detected…
2016-07-01 15:10:04.613 app[5044:1990814] Pocketsphinx heard “” with a score of (-29001) and an utterance ID of 0.
2016-07-01 15:10:04.614 app[5044:1990814] Hypothesis was null so we aren’t returning it. If you want null hypotheses to also be returned, set OEPocketsphinxController’s property returnNullHypotheses to TRUE before starting OEPocketsphinxController.
2016-07-01 15:10:05.642 app[5044:1990814] Speech detected…
2016-07-01 15:10:07.790 app[5044:1990619] End of speech detected…
2016-07-01 15:10:07.940 app[5044:1990619] Pocketsphinx heard “” with a score of (-45240) and an utterance ID of 1.
2016-07-01 15:10:07.941 app[5044:1990619] Hypothesis was null so we aren’t returning it. If you want null hypotheses to also be returned, set OEPocketsphinxController’s property returnNullHypotheses to TRUE before starting OEPocketsphinxController.
2016-07-01 15:10:08.437 app[5044:1990814] Speech detected…
2016-07-01 15:10:10.359 app[5044:1990814] End of speech detected…
2016-07-01 15:10:10.463 app[5044:1990814] Pocketsphinx heard “” with a score of (-37409) and an utterance ID of 2.
2016-07-01 15:10:10.465 app[5044:1990814] Hypothesis was null so we aren’t returning it. If you want null hypotheses to also be returned, set OEPocketsphinxController’s property returnNullHypotheses to TRUE before starting OEPocketsphinxController.
Regsitered for nod callback
2016-07-01 15:10:11.968 app[5044:1990571] Speech detected…
2016-07-01 15:10:12.910 app[5044:1990814] End of speech detected…
2016-07-01 15:10:12.964 app[5044:1990814] Pocketsphinx heard “OK” with a score of (-33460) and an utterance ID of 3.
Heard: OK
2016-07-01 15:10:12.978 app[5044:1990481] Stopping listening.
Listening can’t stop yet for the following reason or reasons: an utterance is still in progress | Trying again.
2016-07-01 15:10:13.530 app[5044:1990594] Audio route has changed for the following reason:
2016-07-01 15:10:13.555 app[5044:1990594] There was a category change. The new category is AVAudioSessionCategoryPlayAndRecord
2016-07-01 15:10:13.563 app[5044:1990594] This is not a case in which OpenEars notifies of a route change. At the close of this method, the new audio route will be <Input route or routes: “MicrophoneBuiltIn”. Output route or routes: “BluetoothA2DPOutput”>. The previous route before changing to this route was “<AVAudioSessionRouteDescription: 0x131408fe0,
inputs = (
“<AVAudioSessionPortDescription: 0x12eef5cc0, type = BluetoothHFP; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tsco; selectedDataSource = (null)>”
);
outputs = (
“<AVAudioSessionPortDescription: 0x12efe6a50, type = BluetoothHFP; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tsco; selectedDataSource = (null)>”
)>”.
2016-07-01 15:10:13.569 app[5044:1990481] Attempting to stop an unstopped utterance so listening can stop.
2016-07-01 15:10:13.571 app[5044:1990481] No longer listening.
Unregistering success.
Audio Session Started.
2016-07-01 15:10:13.621 app[5044:1990594] Audio route has changed for the following reason:
2016-07-01 15:10:15.080 app[5044:1990594] There was a category change. The new category is AVAudioSessionCategoryPlayAndRecord
2016-07-01 15:10:15.119 app[5044:1990594] This is not a case in which OpenEars notifies of a route change. At the close of this method, the new audio route will be <Input route or routes: “BluetoothHFP”. Output route or routes: “BluetoothHFP”>. The previous route before changing to this route was “<AVAudioSessionRouteDescription: 0x12efdaff0,
inputs = (
“<AVAudioSessionPortDescription: 0x131441f90, type = MicrophoneBuiltIn; name = iPhone Microphone; UID = Built-In Microphone; selectedDataSource = Front>”
);
outputs = (
“<AVAudioSessionPortDescription: 0x12ef1cbb0, type = BluetoothA2DPOutput; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tacl; selectedDataSource = (null)>”
)>”.
Audio Session Stopped.
2016-07-01 15:10:18.410 app[5044:1990594] Audio route has changed for the following reason:
2016-07-01 15:10:18.439 app[5044:1990594] There was a category change. The new category is AVAudioSessionCategoryPlayAndRecord
2016-07-01 15:10:18.452 app[5044:1990594] This is not a case in which OpenEars notifies of a route change. At the close of this method, the new audio route will be <Input route or routes: “MicrophoneBuiltIn”. Output route or routes: “BluetoothA2DPOutput”>. The previous route before changing to this route was “<AVAudioSessionRouteDescription: 0x13121e4f0,
inputs = (
“<AVAudioSessionPortDescription: 0x1312f2180, type = BluetoothHFP; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tsco; selectedDataSource = (null)>”
);
outputs = (
“<AVAudioSessionPortDescription: 0x131238fc0, type = BluetoothHFP; name = Maven Co-Pilot; UID = 00:07:80:C3:A1:69-tsco; selectedDataSource = (null)>”
)>”.