Skip to content

Forum in maintenance, we will back soon πŸ™‚

Youtube Summarizati...
 
Notifications
Clear all

Youtube Summarization of a german video

5 Posts
3 Users
2 Reactions
8 Views
(@christian-mantseris)
Posts: 2
New Member Customer Registered
Topic starter
 

Hi, the youtube summarization code works well for english youtube videos. But I also want to summarize german videos. I tried to adjust the code accordingly, but it didn't work. Could you tell me what I'm missing?



Β 

 
Posted : 08/22/2024 12:33 am
(@husein)
Posts: 550
Member Moderator
 

@christian-mantseris Hello christian, the error indicates that there is no german transcript for the video you want to summarize. Try extracting the normal english transcript and let the AI summarize it and write it in german (the prompt you provided should be good enough to do this).

Plus, make sure to enter your own OpenAPI key in its respective field if you didnt.

 
Posted : 08/22/2024 7:36 am
(@christian-mantseris)
Posts: 2
New Member Customer Registered
Topic starter
 

@husein Thanks for your help but in fact I had an error in my code and after I fixed it works fine now. With a slight change in the code one can summarize youtube videos from any country.

If someone wants to summarize a youtube video which is spoken in a non-english language than the following code line from the module helpers.py needs to be changed.

transcript = YouTubeTranscriptApi.get_transcript(video_id)
Β 
this line has to be replaced by
Β 
transcript=YouTubeTranscriptApi.get_transcript(video_id, languages=['de'])
Β 
'de' stands for german
Β 
when extracting the foreign transcript than the prompt in module youtube_prompts.py should also be adjusted. Just replace the word English by the language of the video.
Β 
By the way, here are the abreviations for all the different languages:
Β 
- ar ("Arabic")
- hy ("Armenian")
- as ("Assamese")
- ay ("Aymara")
- az ("Azerbaijani")
- bn ("Bangla")
- ba ("Bashkir")
- eu ("Basque")
- be ("Belarusian")
- bho ("Bhojpuri")
- bs ("Bosnian")
- br ("Breton")
- bg ("Bulgarian")
- my ("Burmese")
- ca ("Catalan")
- ceb ("Cebuano")
- zh-Hans ("Chinese (Simplified)")
- zh-Hant ("Chinese (Traditional)")
- co ("Corsican")
- hr ("Croatian")
- cs ("Czech")
- da ("Danish")
- dv ("Divehi")
- nl ("Dutch")
- dz ("Dzongkha")
- en ("English")
- eo ("Esperanto")
- et ("Estonian")
- ee ("Ewe")
- fo ("Faroese")
- fj ("Fijian")
- fil ("Filipino")
- fi ("Finnish")
- fr ("French")
- gaa ("Ga")
- gl ("Galician")
- lg ("Ganda")
- ka ("Georgian")
- de ("German")
- el ("Greek")
- gn ("Guarani")
- gu ("Gujarati")
- ht ("Haitian Creole")
- ha ("Hausa")
- haw ("Hawaiian")
- iw ("Hebrew")
- hi ("Hindi")
- hmn ("Hmong")
- hu ("Hungarian")
- is ("Icelandic")
- ig ("Igbo")
- id ("Indonesian")
- ga ("Irish")
- it ("Italian")
- ja ("Japanese")
- jv ("Javanese")
- kl ("Kalaallisut")
- kn ("Kannada")
- kk ("Kazakh")
- kha ("Khasi")
- km ("Khmer")
- rw ("Kinyarwanda")
- ko ("Korean")
- kri ("Krio")
- ku ("Kurdish")
- ky ("Kyrgyz")
- lo ("Lao")
- la ("Latin")
- lv ("Latvian")
- ln ("Lingala")
- lt ("Lithuanian")
- luo ("Luo")
- lb ("Luxembourgish")
- mk ("Macedonian")
- mg ("Malagasy")
- ms ("Malay")
- ml ("Malayalam")
- mt ("Maltese")
- gv ("Manx")
- mi ("Māori")
- mr ("Marathi")
- mn ("Mongolian")
- mfe ("Morisyen")
- ne ("Nepali")
- new ("Newari")
- nso ("Northern Sotho")
- no ("Norwegian")
- ny ("Nyanja")
- oc ("Occitan")
- or ("Odia")
- om ("Oromo")
- os ("Ossetic")
- pam ("Pampanga")
- ps ("Pashto")
- fa ("Persian")
- pl ("Polish")
- pt ("Portuguese")
- pt-PT ("Portuguese (Portugal)")
- pa ("Punjabi")
- qu ("Quechua")
- ro ("Romanian")
- rn ("Rundi")
- ru ("Russian")
- sm ("Samoan")
- sg ("Sango")
- sa ("Sanskrit")
- gd ("Scottish Gaelic")
- sr ("Serbian")
- crs ("Seselwa Creole French")
- sn ("Shona")
- sd ("Sindhi")
- si ("Sinhala")
- sk ("Slovak")
- sl ("Slovenian")
- so ("Somali")
- st ("Southern Sotho")
- es ("Spanish")
- su ("Sundanese")
- sw ("Swahili")
- ss ("Swati")
- sv ("Swedish")
- tg ("Tajik")
- ta ("Tamil")
- tt ("Tatar")
- te ("Telugu")
- th ("Thai")
- bo ("Tibetan")
- ti ("Tigrinya")
- to ("Tongan")
- ts ("Tsonga")
- tn ("Tswana")
- tum ("Tumbuka")
- tr ("Turkish")
- tk ("Turkmen")
- uk ("Ukrainian")
- ur ("Urdu")
- ug ("Uyghur")
- uz ("Uzbek")
- ve ("Venda")
- vi ("Vietnamese")
- war ("Waray")
- cy ("Welsh")
- fy ("Western Frisian")
- wo ("Wolof")
- xh ("Xhosa")
- yi ("Yiddish")
- yo ("Yoruba")
- zu ("Zulu")
Β 
Β 
 
Posted : 08/23/2024 9:36 pm
(@husein)
Posts: 550
Member Moderator
 

@christian-mantseris Hello, Christian yeah I know you can extract the transcript in another language using the additional parameter; however when I checked your error it stated that the video doesn't contain a transcript in German, so I quickly jumped to a conclusion without going over the code 😅

 
Posted : 08/24/2024 6:44 am
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

@christian-mantseris Thanks for sharing πŸ™‚

 
Posted : 08/24/2024 8:43 am
Share:
[the_ad_group id="312"]