I experienced the Recent Calls page crashing after I used a Custom Speech Provider as the STT of my Application. Looking into the errors that logged, I found out that the issue was with the Call Recording Player that was breaking to render (player.tsx).
The first one simply don't show the STT name in the modal. And the second one ends up showing "custom" as the name. For now I went with the second option here.
Please let me know which approach would be better, fixing here in the WebApp passing a fallback text when vendor.name does not exist (or when it is a Custom Speech Provider) or in the FeatureServer where we can try to find out what is the Custom Speech Name to pass it or already add there in the object a default name when using Custom Speech Provider. I think I already have both approaches ready here to open a PR.
I experienced the Recent Calls page crashing after I used a Custom Speech Provider as the STT of my Application. Looking into the errors that logged, I found out that the issue was with the Call Recording Player that was breaking to render (
player.tsx
).Looking a bit more, I think the issue is happening when trying to render the modal that pops up with the STT details when clicking the audio waves. And this is due to the absence of the
data.vendor.name
property in the STT object, which is expected to exist in the WebApp. Refer to: https://github.com/jambonz/jambonz-webapp/blob/main/src/containers/internal/views/recent-calls/player.tsx#L142As a quick workaround I could do:
or
The first one simply don't show the STT name in the modal. And the second one ends up showing "custom" as the name. For now I went with the second option here.
But I think maybe a better approach would be making the fix on the feature-server, where the object used by the WebApp is created. Note that differently from the other providers, i.e.: Google:
{ vendor: { name: 'google' } }
, the custom provider does not include this vendor object, therefore no name will be send, even though is required in the WebApp. Custom, refer to: https://github.com/jambonz/jambonz-feature-server/blob/78fd4549af016c9dabce2dc52d06f5dbe686865e/lib/utils/transcription-utils.js#L228 Google, refer to: https://github.com/jambonz/jambonz-feature-server/blob/78fd4549af016c9dabce2dc52d06f5dbe686865e/lib/utils/transcription-utils.js#L221-L222Please let me know which approach would be better, fixing here in the WebApp passing a fallback text when
vendor.name
does not exist (or when it is a Custom Speech Provider) or in the FeatureServer where we can try to find out what is the Custom Speech Name to pass it or already add there in the object a default name when using Custom Speech Provider. I think I already have both approaches ready here to open a PR.Thanks :)