Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMD cleanup listener issue #918

Open
xquanluu opened this issue Sep 26, 2024 · 2 comments
Open

AMD cleanup listener issue #918

xquanluu opened this issue Sep 26, 2024 · 2 comments

Comments

@xquanluu
Copy link
Contributor

TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined
at checkListener (node:events:276:3)
at Endpoint.removeListener (node:events:682:7)
at TaskRestDial.stopAmd (/home/admin/apps/jambonz-feature-server/lib/utils/amd-utils.js:394:10)
at TaskRestDial.turnOffAmd (/home/admin/apps/jambonz-feature-server/lib/tasks/rest_dial.js:51:62)
at RestCallSession._hangup (/home/admin/apps/jambonz-feature-server/lib/session/rest-call-session.js:118:25)
at RestCallSession._callerHungup (/home/admin/apps/jambonz-feature-server/lib/session/rest-call-session.js:109:10)
at Dialog.emit (node:events:519:28)
at Dialog.handle (/home/admin/apps/jambonz-feature-server/node_modules/drachtio-srf/lib/dialog.js:497:14)
at Object.handle (/home/admin/apps/jambonz-feature-server/node_modules/drachtio-srf/lib/srf.js:136:46)
at next (/home/admin/apps/jambonz-feature-server/node_modules/drachtio-srf/lib/proto.js:202:15)

https://github.com/jambonz/jambonz-feature-server/blob/main/lib/utils/amd-utils.js#L394
line 394: ep.removeListener(GoogleTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(GoogleTranscriptionEvents.EndOfUtterance, ep.amd.EndOfUtteranceHandler);
     ep.removeListener(AwsTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(AzureTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(AzureTranscriptionEvents.NoSpeechDetected, ep.amd.noSpeechHandler);
     ep.removeListener(NuanceTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(DeepgramTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(SonioxTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(IbmTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(NvidiaTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
     ep.removeListener(JambonzTranscriptionEvents.Transcription, ep.amd.transcriptionHandler);
@davehorton
Copy link
Contributor

@xquanluu why was this closed?

@xquanluu xquanluu reopened this Sep 26, 2024
@xquanluu
Copy link
Contributor Author

Closed by misktake, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants