reddit / emacs

Working with SRT / CSV for transcribed text

FailedHumanPrototype · 2022-10-14 04:17
For work, I often find myself working on 1h transcripts of interviews which I need to select text from, amend, and edit in text before touching the interview file itself. Would there be any established way of hiding the timecode information yet still working with the text? That would allow me to take that timecode info, link it up to an XML and have it do the first step of the video editing process for me (though I'll probably also have some challenges setting that up lol)
deaddyfreddy · 2022-10-14 08:52
Are you talking about something like https://github.com/sachac/subed ?
FailedHumanPrototype · 2022-10-14 09:28
Not quite ! Though this will be useful for me, what I want is a way to integrate an srt into an org mode document.Basically, quoting the document with entry points for each SRT timecode entry. Is that something that is at all feasible or should I try and lower my ambitions ? ​ So basically : \_example.org\_ \*\* Introduction \*\*\* SRT Interview snippet \*\*\* Commentary \*\*\* SRT Interview 2 snippet ​ And so on To be output to an XML later on so that I can start editing it directly from the points that I want
deaddyfreddy · 2022-10-14 09:46
> what I want is a way to integrate an srt into an org mode document. sounds like org-babel subed extension :)
FailedHumanPrototype · 2022-10-15 03:03
All right, I'll look into org-babel! I don't know much about it save for org-babel-tangle but if it is not an unreasonable amount of work that would be wonderful ! ​ Cheers
sachac · 2022-10-22 19:38
I like to use subed with the timestamps set to a low-contrast face so that they blend into the background. The vtt format is a little more compact since it doesn't have ID lines. Alternatively, you could try the .ass format, since it puts all the text on the right edge of the line. I have some code for working with the tab-separated files from Audacity label exports which are even cleaner, but I haven't committed it to subed yet. Yet another option is to convert the subtitles into an Org table or CSV, manipulate it, and then convert the table back out into your favourite format. I used something like that technique in [https://github.com/sachac/emacsconf-2020-emacs-news-highlights](https://github.com/sachac/emacsconf-2020-emacs-news-highlights) \- see the my/generate-subtitles function in [https://raw.githubusercontent.com/sachac/emacsconf-2020-emacs-news-highlights/master/README.org](https://raw.githubusercontent.com/sachac/emacsconf-2020-emacs-news-highlights/master/README.org) . Hope that helps!
FailedHumanPrototype · 2022-10-23 06:17
>I have some code for working with the tab-separated files from Audacity label exports which are even cleaner, but I haven't committed it to subed yet. Oh wonderful! Thanks Sacha ! I'd still have to find a way to export both an XML with an accompanying subtitle file, as well as an odt without timestamps in my pandoc export, but that last part should be relatively trivial with some sed trickery, if I get around to figuring out how that works. Once I finish up preparing my EmacsConf talk I'll definitely look into that a bit more :) Org tables on an Apple M1 and my config are intolerably laggy and slow, so I might not be able to use that, unfortunately. ​ Cheers !
sachac · 2022-10-23 17:13
Just added subed-tsv-mode in subed.el, and subed-convert too. Maybe that format might be easier for you? Also, if this is for the EmacsConf talk, feel free to submit it without captions. We'll get OpenAI Whisper to do a first pass and then a volunteer (or you) can edit the captions. If you happen to have a plain-text script, that would be useful too. :)
FailedHumanPrototype · 2022-10-24 01:21
Oh, this one isn't for emacsconf this year, though there might be something to say about it next year :) Just for future projects and interviews. ​ I'll run whisper on my machine, no worries!