Spoken movie subtitles?

Moderator Note: As Gale Andrews has requested below, I transferred mederi’s summary to the Wiki proposal page: http://wiki.audacityteam.org/wiki/Proposal_Transcription_Editor - I have left this full discussion on the forum, but moved it to the Audio Processing section, as it is referenced from the Wiki proposal page - WC


I would like to read some movie subtitles and record my voice to play it later together with the movie. It is funny to watch the movie and hear own voice as interpreter and just relax. Try it yourselves :slight_smile:
As I have not found any simple software for this particular purpose I would like to ask whether Audacity is suitable one for a voicesubtitling. I do not want to play all the movie with subtitles first and record one long subtitle audio track. I would like to do it some faster way. I want to open subtitles text file (*.srt) in Notepad window to read the content and to record particular lines as multiple audio tracks in Audacity window (R key → to read one subtitle line → SPACE bar to stop recording (could be R too) → R → another line → …). This way it is quite quickly. Then Audacity can export multiple tracks to save them as many files with numbered names.
Could Nyquist help to generate a single long voice track from these files according to the start times of appearance of subtitles (from *.srt file)? Audacity can generate a long silence track, just to mix in spoken subtitles to right places.
Thanks in advance for any advice.

Not very easily.
Do you have any programming skills in any language?

Hi.
Yes, I do (PHP, VBA macros in Excel). So I have some experience with scripting language. I just found some Nyquist window among effects in Audacity menu. Then I found out that Nyquist is a tool dealing with audio and using some kind of scripting language (XLisp) to automate a work. So I would be able to generate long text script and to use the times from *.srt file in the right form. I just need an example for three, four files (voices), and which functions to use.
Can Nyquist mix 2 audio tracks with some time shift?
Or is there some merge function for joining audio tracks? Then some function to find out the length of recorded voice (if the voice is longer then time of appearance for next voice, shift the time of next voice right after the previous one, so no overlapping), then some calculation for the length of following silence until the next time position of the voice, then generate the silence, then join voice to the resultant audio track, join silence, join another voice, …
Thanks

Sorry, all this is just too complicated.
SUBTITLER in Audacity should not be a problem. There is a LABEL track available: Tracks > Add New > Label Track. This is already good enough to write subtitles according to the audio track. Perhaps some simple video player window could be later implemented too. Exporting of labels into a subtitle file (.srt) could be done here: Tracks > Edit Labels > Export…
Accordingly a subtitle file (
.srt) could be imported right here: Tracks > Edit Labels > Import… It just needs a little conversion of the text file.
Subtitles are in the label track now. I can add new audio track. Using the mouse I can move cursor in the audio track to the first label (subtitle) and start recording (Shift+R) my voice from microphone, read first label and then stop recording (Space bar). Then I have to move cursor in audio track to next label and record another subtitle. If there was some way (a key on the keyboard) to move cursor directly to the next (or previous) label, it would be all I need for the making of “voicetitles”.

Label Track: Import/Export subtitle files (*.srt). End of the lines (sometimes there are more lines of text on the screen) could be replaced with separator pipe sign (I). Label Track Font has problem with central european languages (cannot add a little “v” sign on some letters: l, s, r, z, n).
Audio Track: 2 keyboard keys (previous / next) to move cursor according to the labels (subtitles) and one key to replace Shift+R combination, that would start and stop recording, too + optional automatic jump to next label

Where should I post these suggestions, please?

I’ll move this topic into the “Adding Features to Audacity”, as that seems to be about the best fit.

Nyquist is not particularly good for manipulating text or files. It is very good at manipulating audio.
Nyquist does not have direct access to tracks in Audacity. In most Nyquist plug-ins, audio data is passed from the selected track to Nyquist in a variable (an array for stereo tracks). Nyquist then does whatever to the the audio and passes it back to Audacity. Audacity then puts the data back into the track where it came from. Nyquist can also be used for generating audio, in which case if there is no track selected, Audacity will create a track for the generated audio to go into. Nyquist can also generate “labels” (which Audacity places into a label track) or outputs text which Audacity puts into a pop-up. Nyquist can access files directly, but it is tricky. Nyquist cannot access Audacity tracks directly, just through the mechanisms above.

Have you seen the “Karaoke” feature? This is used in conjunction with a label track (see about 2/3rds down this page: http://manual.audacityteam.org/man/View_Menu )

Labels can be exported as text files.
In Audacity 1.3.12:
File menu > Export Labels

and there is a label editor in Audacity 1.3.12 (near the bottom of the “Tracks menu > Edit Labels”

Although not easy in Nyquist, with other scripting languages it should be fairly simple to read a previously exported label file and convert to a .SRT file, or vice versa.
Perhaps a Python script, or whatever language you are most familiar with.

Thanks for the explanation how Nyquist cooperate with Audacity.

Here are my suggestions which could be added to Audacity. I grouped them in several levels:

Level 1
Label Track

  • there is a problem with fonts, where central european characters are not fully supported (cannot add a little “v” sign on some consonant letters: l, s, t, r, z, n);
    Audio Track
  • to add a keyboard key to move cursor to next label position.

Level 2

  • to add support (import/export) for movie subtitle files (*.srt);
  • to add option for more lines of text in labels (subtitles contain up to 3 lines per screen). If one line only then to use some separator character, e.g. vertical pipe sign “|”;
  • to add a key to the previous label;
  • a single key to start recording (alternative to SHIFT+R) and to stop recording, too (the same key) + optional automatic jump to next label.

Level 3

  • effect or function to mix voice track (chain of recorded voices separated with silences) with sound track and to control volume level of sound track (if it is too loud) where voices are to be mixed in. Optionally some fade outs/ins of the sound to desired level before/after voices (non silences).

Level 4

  • simple and quick movie player window for better control of sounds and subtitles position;
  • Text-to-Speech (TTS) to record labels (subtitles) using various synthetised voices (SAPI4, SAPI5) like well known english Sam’s voice in Windows XP.

Try the Tab key.

You can currently have multiple labels in the same position. They will stack in the label track one above the other. You can resize the label track if necessary by grabbing the bottom edge with the mouse and dragging.

Try SHIFT+Tab

The keyboard short-cuts can be customised in “Edit menu > Preferences > Keyboard”, but I think there are technical reasons why you can’t allocate the same key to two actions.

I’m not quite sure what you mean, but it sounds like the “Auto Duck” effect. http://manual.audacityteam.org/man/Auto_Duck

Tab key only cycles among input text fields of labels to edit them if Label track is active.
I meant keys to move cursor to starting time of next/previous label when in active Audio track where recording voice from microphone.

For possible import/export support straight from/in *.srt subtitle file and for better handling (shifting forward/backward) multiple lines should stay in one label. To control order of 3 labels and the same starting point is quite tricky. But as a temporary solution to have labels in the same position it is a good idea. Then I can externally (probably some macro in Excel) convert label.txt file content to “srt” form and group labels starting in the same time.

Thank you. “Auto Duck” effect looks exactly what I meant. I am going to try it out.

Probably there is a little misunderstanding. I would like to make new Selection Start in audio track to record next voice under next Label exactly where next Label starts. I wish there was any key (button) for making of Selection Start right under next Label Start rather than manually with mouse pointer.

I am still learning English and calling things with right names, too. Sorry :wink:

So am I, and I’m English :smiley:
You’re doing very well.

Assuming that you have a label track with an empty track below it (to record into):

  1. Click in a label (any label)
  2. Tab or SHIFT+Tab - to move to the label that you want.
  3. ENTER - to take you out of “text edit”
  4. Down (cursor key) - to move focus to the audio track
  5. ENTER - to select the audio track
  6. SHIFT+R - to start recording from the cursor position.

It’s not as simple as a single key press, but I’m hoping that eventually it will be possible to create “macros” that can combine multiple commands and allocate them to a single key.

Thanks for reply. “Focusing” and “TABbing” really does the trick.
The process of recording of voice according to movie subtitles should be really as simple as possible to make it fast. You know there are usually 500 and more subtitle screens in a movie.
So one or two keyboard keys (record/stop, next) and movie subtitle files (srt) support is my dream.
I hope that I have brought a couple of good ideas here that could help to improve this great software. Thanks.

I’m not against your ideas, I’m just indicating what is already implemented in Audacity.
Do you think that you could condense your proposals into specific items?

That’s the kind of thing that I mean, but how would it be implemented? Would it have any practical application beyond making spoken subtitles?

Hi.
Recently I was looking for some simple audio tool on the Internet to adjust some movie audio track. I found Audacity, a real freeware masterpiece, that helped me very much (cutting, mixing, adjusting tempo). Then I played myself with recording my voice through microphone and got the idea to record my own spoken movie subtitles. Suddenly I found out that Audacity is already a good SUBTITLER.

If you show to users the new Audacity feature: SUBTITLES to VOICE and VOICE to SUBTITLES, they will use it. Especially users abroad (outside UK, USA) are watching foreign movies in original dubbing with a help of subtitles. Audio-video enthusiasts will be interested despite that Audacity is audio software only.

Some little adjustments in program code should not be a problem for programmers to improve this unfolded feature.

There is a label track that can be used for movie subtitles, too. Just to add import/export (conversion) of “subtitles.srt” besides “labels.txt” and to decide how to implement multiple lines of subtitles.
SRT example:

1
00:04:02,974 --> 00:04:07,957
- Hello, cowboy!
- Who are you?
Are you talking to me?

2
00:04:08,668 --> 00:04:10,501
I am sorry, but I really didn't want 
to offend you.
Ľľ Šš Čč Ťť Žž Ňň Ďď Řř Ůů Ěě ÁáÉéÍíÓóÚúÝý äô

I prefer to put multiple lines (up to 3, or more?) of 1 subtitle screen into 1 label. Then I would add some switch button in menu at the beginning of label track to switch between 2 options: 1 line (multiple subtitle lines separated with some separator character like “|”) and more lines (if subtitle screen contains 3 lines, then 3 lines in a label, too) of text in a label. One line using separator is good but multiple lines could be better.

There is something wrong with Fonts in Label Track. They are probably built-in and do not fully support Central European characters. If there were operating system fonts (Windows XP) used, there would not be the problem. I do not know how it works, whether I am right. Possible bug.

Then I would add:
Edit > Move Cursor > To Next Label (S) - this should find forward from actual cursor (time) position the nearest label start time and put there cursor vertical line (like clicking with the left mouse button under the lable sets new Selection Start Time according to a place of clicking).
Edit > Move Cursor > To Previous Label (A) - backward to the nearest lable start time
Transport > Append Record/Stop (D) - single key to start and to stop recording, too (like Space bar Play/Stop). This could be alternative to Append Record (Shift+R). Right after Stopping of recording one Label there could also be some option (probably on/off button in menu at the beginning of the audio track) for automatic shift (jump) of the cursor (Selection Start) to (under) next Label, so user needs for the whole process only this one key if he does not make any mistakes.

A recorded voice audio track can be played together with the movie or Auto Duck effect can be used and then it can be mixed with original sound audio track.

Vice versa, writing of SUBTITLES according to movie audio, translating movie, song, adding comments… for all this is Label track already good enough, not only audio track Descriptor and Karaoke.

So like I wrote above, SUBTITLES to VOICE and VOICE to SUBTITLES, Audacity could be with some effort a simple and complete SUBTITLER, too. Then I have had some ideas about video player window or Text-to-Speech (TTS) support to let a computer to speak (read subtitles) and record it. Later I could think of it and maybe come with more details, too if there was any interest.

Thanks for reading and replying

According to SRT File Extension - Open .SRT File (Video/Movie Subtitle File), srt files are pretty similar structurally to Audacity text files so it should not be that difficult to convert them.

You sent that entire list (Levels 1 - 4) to our feedback address which is fine, but as you also started a Forum discussion here, anything in the points you raise which can’t be (easily) done in Audacity will be automatically added as a Feature Request. That only means that the votes for the ideas will be counted, not that they will necessarily be implemented.

Your “cannot add a little “v” sign on some consonant letters: l, s, t, r, z, n” is the only point that looks as if it could be called a “bug”. However you’ll need to provide full steps to reproduce what the problem is, including what language Windows XP is installed in and exactly how you are entering the keyboard input for š and other accented characters into the labels.

I would suggest you first of all try the 1.3.13 alpha development build. 1.3.13 has Improved key/character event handling for Unicode entry on Windows and fixes some problems that prevented certain characters (decimal values 300 to 400) from being typed into label tracks.

Audacity (Unicode) stores Unicode characters as UTF-8.

Microsoft Wordpad and Notepad don’t support UTF-8 properly so if you type accented (or any Unicode) characters in an Audacity label, export the label file and look at it in those applications, those non-Latin characters will display incorrectly like the above. Those characters will only display correctly in a text editor that supports UTF-8 like Notepad++.

Similarly if you create a text file containing accented characters in Notepad (or any Unicode character in Wordpad) and import it as a label file into a Unicode version of Audacity, then Audacity probably won’t open it at all (true on Windows 7).



Gale

This is really a note for Peter. There is now a Proposal page on the Wiki started by James and added to by me that pulls together ideas for some kind of “transcribers panel” with buttons/shortcuts for label operations, together with other editing improvements:

  • multi-line editing
  • customisable label fonts, colours and categories
  • a feature to attach new audio to a label
  • a video viewer (or bridge to one)

I think to benefit the most people, it’s important this proposal goes beyond just the subtitle use case.

I think Peter when the time comes to transfer this to Pending Feature Requests on the Wiki, you could just transfer mederi’s summary post plus any other votes people add here for anything listed on the above Proposal page.



Gale

Hello!
Unicode (UTF-8) is now in Audacity 1.3.13 all right. All characters work fine like on these web pages here. Thanks.

I really meant to improve only already built-in features of Audacity as a simple SUBTITLER rather than a robust SUBTITLE EDITOR like standalone applications. It will take long time to implement all functions into Audacity if ever (everything or nothing?).

Direct SRT support where import feature just adds some choosen separator character instead of ends of lines (enters) so all lines of one subtitle screen stay in one label as a single line and export feature that replaces separators with ends of lines should be really easy task for programmers. This can be done also externally outside Audacity. But this is only what is needed for the birth of Audacity as a simple compact SUBTITLER, too.
So writting of subtitles (VOICE to SUBTITLES) according to sound track from a movie is already supported in Label Tracks. And what about vice versa process, SUBTITLES to VOICE? No problem! Appending of records in one Audio Track is prerfect feature. You just move cursor right under the next Label and start recording your voice (SHIFT+R). A silence among recordings is added automatically. Now it is possible (besides using of a mouse to scroll-right the window and to click there) only through focusing a Label Track, using Tab key to jump to next Label and returning focus to the audio track. And how to speed up the whole process? A single key to move cursor under the next Label (and to jump there to show the Lable on the screen). Recording of macros in Audacity could be the solution, too, but I think that it is too complicated for programmers.
To record voice using R key, which always creates new Audio Tracks, according to Label Track is uncomfortable as it scrolls-down a window screen and a Label Track disappeares. Multiple Audio Tracks coud be directly connected with particular Lables.

And maybe later if there will be enough interest to improve these features even further, multiple lines could be added, append record/stop key with automatic jump option, colours, splitting and merging of labels, grouping, time shifting, a video viewer, …

Now, a Label Track behaves a bit differently in newer 1.3.13-alpha version than in older 1.3.12-beta.

In older version I can use TAB key to select next Label. Input field becomes white with a text cursor at the end of text inside and ready for editing. Now I cannot press SHIFT+R to start recording, but I can use DOWN-ARROW key to give focus from Label Track to Audio Track under it, where SHIFT+R already works. Then SPACE bar to stop recording and UP-ARROW to return focus to Label Track where the same input field of the Lable is still active. Then I can use TAB again to select next Label.

In newer version it is not possible to use DOWN-ARROW key if an input field is active (white). Now I must press ENTER key to finish edit mode and a label becomes blue. Now I do not need to give focus to Audio Track below. Now I can start recording using SHIFT+R directly from Label Track. The problem is next Label after recording stops. If I use TAB key again, it chooses the first Label and not the next one. I need to press TAB key several times to get really to the next Label.

Label Track is in EDIT MODE all the time. I would suggest to turn off the edit mode. TAB key could then select next Label without activating of input field with a text. To enter to edit mode, some key should be pressed first. I suggest ENTER key that starts and also ends editing of a Lable. And I prefer to display the beginning of a Lable first if it is too long. Entering to edit mode could then roll a screen to the right to show the end of a text inside a white input field with a text cursor at the very end of it. Actual position (Label) should be remembered even if I change focus to another track and then I return focus back to Label Track.

Thanks.

Hello.
I would like to share my simple convertor of subtitles.srt files’ content to audacity_labels.txt files’ content and vice versa. It is a Microsoft Excel file with a single sheet and some macros.
Perhaps it will be useful to somebody. Programmers of Audacity could check my codes (VBA) there and let themselves get inspired for direct import/export of movie subtitles as Labels in Audacity.
Thanks.
>> Download file:
Audacity Labels Subtitles Convertor.xls (58 KB)
Audacity Labels (TXT) Subtitles (SRT, SBV) Convertor.xls (88.5 KB)

Thanks for your contribution. Your .xls worked for me by clearing all the content from row 4 onwards, pasting in some .srt content then following your instructions. However the “…” ellipsis character you used after “Save As” caused the .txt file saved in Notepad to fail to open in 1.3.12 (Unicode). I must stress again that Audacity (Unicode) won’t open (or ANSI versions may not correctly display) a labels file saved in Notepad that contains non-Latin characters. To use such characters you have to use an editor that supports UTF-8 like Notepad++.

Would it be an idea to add a digital signature to your .xls so that Excel does not ask for its security level to be reduced in order to use the macros?

Would you like to create a Wiki page for “Movie Subtitle files (*.srt)”? It could be a very simple page like the Cue Sheets page that gives users a workaround to convert an Audacity label file to a cue sheet.


Thanks


Gale

Hello
I really do not have to use a text editor other than Microsoft Notepad (Version 5.1 … ) which is part of my Windows XP SP2. And I do not remember that I installed anything special to upgrade it. This is a part of its Save as window:
Notepad - Save as.jpg
I do not own any digital signature. It is really not necessary to do anything with it. Just follow instrunctions in Excel what to do if you do not want to allow macros anytime a document XLS with macros is opened. I do not think that Excel is the right environment for a such application, but it helps me.
My convertor is meant only as a temporary solution and as an inspiration (multylines separator, algorithm of conversion) for Audacity programmers. It is not locked so everybody can study, learn and change my macros there. Is there any reason for not implementing import/export of SRT file type as a relative to labels’ TXT in Audacity soon? Then a Wiki page for external convertor would not make any sense. Just tell users on Audacity web pages about the new feature, about subtitles in Audacity and I am sure that users will use it and bring some new ideas how to improve it. Label Track just needs a bit more interaction with the rest of program environment there.
Please pass this to programmers of Label Track.
Thanks in advance.