09-09-2024 04:31 AM
I want to achieve real time transcription with Webex JS SDK. I am using the 3.0.0-beta.303 version of the library. I am referring below resources:
2. https://developer.webex.com/blog/webex-javascript-sdk-now-has-real-time-meeting-transcription
3. https://github.com/webex/webex-js-sdk/tree/next/docs/samples/browser-plugin-meetings
4. https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/
I am testing it with a sandbox account. The real time transcription is working in the kitchen sink app (authenticated with sandbox account access token). However, it is not working in my implementation. I have ensured:
1. enabledWebexAssistantByDefault is enabled
2. Webex SDK is initiated with enableAutomaticLLM
In my case, meeting:transcription:connected event on meeting does not seem to trigger. meeting.isTranscriptionSupported() is false, checked after joining the meeting. meeting.startTranscription() fails with error "startTranscription is not a function".
I am confused what I am missing? It is weird, that with the same token transcription is working is the kitchen sink app.
Solved! Go to Solution.
09-30-2024 08:45 PM
webex.init() takes a while to initialize. I was able to make it working by wrapping the code inside webex `ready` event.
```
webex.once('ready', () => {
// webex meetings register, sync, join, etc.
});
```
https://developer.webex.com/docs/sdks/webex-meetings-sdk-web-quickstart
09-30-2024 08:45 PM
webex.init() takes a while to initialize. I was able to make it working by wrapping the code inside webex `ready` event.
```
webex.once('ready', () => {
// webex meetings register, sync, join, etc.
});
```
https://developer.webex.com/docs/sdks/webex-meetings-sdk-web-quickstart
09-11-2024 01:43 AM
@subhojitpaul21 I checked your code, that seems to be fine. I also tested our KitchenSink app https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/ with my demo account, that is working fine:
I also noticed that you get the error "Webex Assistant is not supported". This suggest to me that you might be using a site that is using the Webex Assistant instead of the AI Assistant? Note, that there are some limitations when it comes to the older Webex Assistant and the transcripts API (noted here https://developer.webex.com/docs/app-programming-interface-behavior-changes), so it might be the issue here for you too.
Can you test the KitchenSink app with your user and see if you get the transcripts with it? If you do, then it is a code related problem, for which let's open a support ticket - email to devsupport@webex.com .
If you do not get the transcript there either, then it is a site related issue, most likely because you are using the old Webex Assistant instead of the new AI Assistant. To find out how to enable the AI Assistant, see https://help.webex.com/en-us/article/9dofjcb/Administer-Cisco-AI-Assistant-in-Control-Hub .
09-11-2024 02:42 AM
Hi. With the same user token, I can see transcripts in the kitchen sink app.
09-11-2024 03:12 AM
@subhojitpaul21 let's continue discussions on the ticket you created for this (ticket #126659), so we can investigate further. I've replied there, thanks.
09-09-2024 05:06 AM
@subhojitpaul21 it is difficult to provide recommendations without knowing how your code looks like, but generally I would recommend testing:
- that other events are triggering like other Meeting related ones from here https://github.com/webex/webex-js-sdk/tree/next/packages/%40webex/plugin-meetings#meeting-events ?
- meeting.startTranscription() is a function defined in the meeting plugin here https://github.com/webex/webex-js-sdk/blob/7e6755b407b5d08a41916f8f2f263ee6802ec6a4/packages/%40webex/plugin-meetings/src/meeting/index.ts#L4918 . If you get a "startTranscription is not a function". it most likely means that your package is not correctly set, so please look into that part based on the sample app code
09-10-2024 03:49 AM - edited 09-10-2024 05:15 AM
Hi Janos. Thanks for the reply. Basically, I am trying to build an embedded app that should proactively listen to meeting conversation.
The app has HTML and JS. Details:
```
webex: ^3.0.0-beta.303
@webex/plugin-meetings: ^3.0.0-beta.303
-----
custom JS and modules bundled together with browserify
bundle.js loaded via script tag in index.html
```
Custom.js
window.addEventListener("load", () => {
// call https://developer.webex.com/docs/api/v1/meeting-preferences/update-scheduling-options API with
// {
// enabledWebexAssistantByDefault: true,
// enabledJoinBeforeHost: false,
// joinBeforeHostMinutes: 0,
// enabledAutoShareRecording: false
// }
});
// 1. initiate webex
let window = window.webex = Webex.init({
config: {
appName: "webex-assistant",
appPlatform: "webexApp",
fedramp: false,
logger: {
level: "debug"
},
meetings: {
reconnection: {
enabled: true
},
enableRtx: true,
experimental: {
enableMediaNegotiatedEvent: false,
enableUnifiedMeetings: true,
enableAdhocMeetings: true,
enableTcpReachability: false,
enableTlsReachability: false
},
enableAutomaticLLM: true
}
},
credentials: {
access_token: "personal access token from developer portal"
}
});
// 2. meetings register
webex.meetings
.register()
.then(() => {
// 3. meetings sync
webex.meetings
.syncMeetings()
.then(() => {
let allMeetings = webex.meetings.getAllMeetings();
let meetingIds = Object.keys(allMeetings);
// For development - Considering there is only one ongoing meeting.
const meeting = allMeetings[meetingIds[0]];
// 4. meeting event registration
meeting.on("meeting:transcription:connected", () => {
// never invoked.
try {
// attempt 1
meeting.startTranscription()
.then(() => {
//never invoked
console.log("transcription started");
})
.catch((err) => {
console.error(err);
});
}
catch (e) {
console.error(e);
}
});
meeting.on("meeting:receiveTranscription:started", () => {
// never invoked
});
meeting.on("meeting:receiveTranscription:stopped", () => {
// never invoked
});
// 5. meeting join and speak in webex
meeting.join({
enableMultiStream: false,
pin: "",
moderator: false,
breakoutsSupported: false,
moveToResource: false,
resourceId: null,
locale: "en_UK",
deviceCapabilities: [
"SERVER_AUDIO_ANNOUNCEMENT_SUPPORTED"
],
captcha: "",
receiveTranscription: true
}).then((payload) => {
// invoked
console.log(payload);
let allMeetings = webex.meetings.getAllMeetings();
let meetingIds = Object.keys(allMeetings);
// For development - Considering there is only one ongoing meeting.
let meeting = allMeetings[meetingIds[0]];
// always errors with message "isTranscriptionSupported function not found" and shows message "Webex Assistant is not supported"
meeting.isTranscriptionSupported();
try {
// attempt 2
// failed with error startTranscription function not found
meeting.startTranscription()
.then(() => {
//never invoked
console.log("transcription started");
})
.catch((err) => {
console.error(err);
});
}
catch (e) {
console.error(e);
}
})
.catch((e) => {
console.error(e);
});
})
.catch((e) => {
console.error(e);
});
})
.catch((e) => {
console.error(e);
});
meeting.startTranscription() is called inside meeting:transcription:connected, but it is never invoked
meeting.startTranscription() is called after meeting join, then it errors "startTranscription is not a function"
meeting.isTranscriptionSupported() always returns error message "Webex Assistant is not supported". Even though captions real time transcription is working fine on the kitchen sink app and the webex desktop app. I also ensured enabledWebexAssistantByDefault is enabled before webex init.
Meetings register, sync up till meeting.join() works fine without errors.
You suggested that meeting plugin might not be loaded. So I added this as well @webex/plugin-meetings, but still there is no change in behavior.
09-10-2024 09:58 PM
Hi @Janos Benyovszki Based on the code I shared, any idea what else I am missing?
09-10-2024 04:05 AM - edited 09-10-2024 05:16 AM
Also, would like to highlight that, as per prerequisite, the meeting webex assistant license is also enabled for the user.
Also ensured this is enabled https://help.webex.com/en-us/article/hzd1aj/Enable-Webex-Assistant-for-devices
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide