-
Notifications
You must be signed in to change notification settings - Fork 64
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
Discard auto-generated transcript #36
Comments
any luck? |
Either the languageCode is wrong or the order. [
{
"baseUrl": "",
"name": {
"simpleText": "Japans (automatisch gegenereerd)"
},
"vssId": "a.ja",
"languageCode": "ja",
"kind": "asr",
"isTranslatable": true,
"trackName": ""
},
{
"baseUrl": "",
"name": {
"simpleText": "Japans"
},
"vssId": ".ja",
"languageCode": "ja",
"isTranslatable": true,
"trackName": ""
}
] I'm on an old custom version but this is how mine looks like: if (langCode) {
captionTrack =
availableCaptions.find((track: any) => {
/* track.languageCode.includes(langCode); */
return track.vssId === '.' + langCode;
}) ?? undefined;
if (captionTrack === undefined) {
captionTrack =
availableCaptions.find((track: any) => {
/* track.languageCode.includes(langCode); */
return track.vssId === 'a.' + langCode;
}) ?? availableCaptions?.[0];
}
} For the current version this could work? Haven't tried it though let transcriptURL: any
transcriptURL =
config?.lang
? captions.captionTracks.find(
(track) => track.vssId === '.' + config.lang
) // returns undefined if not found
: undefined
if(transcriptURL === undefined){
transcriptURL = (
config?.lang
? captions.captionTracks.find(
(track) => track.languageCode === config?.lang
)
: captions.captionTracks[0]
).baseUrl;
} else {
transcriptURL = transcriptURL.baseUrl
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to discard the auto-generated transcripts. When I pick language "en", the program directly picks the auto-generated one although there is original transcript for the video. I looked for some options but couldn't find any?
The text was updated successfully, but these errors were encountered: