Spoken-Tutorial-Technology/C2/Dubbing-a-spoken-tutorial-using-Audacity-and-ffmpeg/English-timed

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:00 Hello friends. Welcome to this Spoken Tutorial on how to dub from one language into another in 'Linux' Operating System.
00:10 For this, all you need is a headset with an audio input or a stand-alone microphone and speakers which can be attached to your computer.
00:19 Audacity® is a free and open source software for recording and editing sounds.
00:24 It is available for Mac OS X, Microsoft Windows, GNU/Linux and other operating systems.
00:32 You can download it free of cost from the site: audacity.sourceforge.net/download.
00:39 I am using the Ubuntu Linux 10.04 version operating system.
00:44 I have already downloaded Audacity version 1.3 and installed it on my PC through the Synaptic Package Manager.
00:52 For more information on how to install software in Ubuntu Linux,
00:57 please refer to the spoken tutorials on Ubuntu available on this website.
01:02 The first and foremost thing you need to do is to listen to the original video.
01:09 Then translate the script in such a way that the narration time for each sentence is of same or lesser duration than the sentence in the original script.
01:18 This can be done by noting down the begin time of each sentence.
01:23 If you cannot do this for every sentence, you can do this for a combination of two sentences.
01:29 That is, even if there is a mismatch at the end of the first sentence, the sync should become correct after the second sentence is completed.
01:37 It may also be possible to skip a few words or even sentences from the original
01:42 so long as the meaning is not changed. Please ensure that this is done.
01:48 Now, we will open audacity. Click on Applications >>
01:54 Sound & Video and choose Audacity to run it.
01:58 This will open an empty project on your screen.

On the menu bar, you can see various options like - File, Edit, View, Transport, Tracks and others.

02:11 We will learn about some of them as we go along. Under the main menu, you will see the VCR controls - Pause, Play, Stop, Rewind, Forward and Record.
02:25 Next to this, you will find the Audacity Tools toolbar.
02:30 This has the Selection Tool and the Time Shift tool which we will use in this tutorial.
02:36 By default, the Selection Tool is active.
02:40 Let's do a dubbing now. I will play a tutorial on Scilab which is in English, that is – 'matrixoperation.wmv' (tutorial plays).
03:03 And, I need to dub this tutorial into Hindi using Audacity. I have already done its translation and noted the timings as mentioned earlier.
03:14 Now, I’m going to record it here. For recording, click on the Record button and start the narration.
03:22 (साइलैब के इस्तेमाल से मैट्रिक्स ऑपरेशन के इस ट्यूटोरियल में आपका स्वागत है । इस ट्यूटोरियल के अभ्यास केलिए आपके सिस्टम में साइलैब का संस्थापन होना आवश्यक है ।)
03:32 Click on the STOP button to stop the recording. You will notice 2 stereo tracks on the Audio Timeline where the narration can be seen.
03:43 The spikes are waveforms. Stereo Tracks contain a single label area to the left with two waveforms on the right.
03:50 These correspond to the 2 channels of input - left channel and right channel.
03:56 Ideally, record in one go. You will end up with a single audio track. Remember to pause for 1 second in between sentences, in this case.
04:08 Now, split the clip into smaller clips at the beginning of each sentence. Ctrl+I is the shortcut for splitting the audio tracks into smaller clips.
04:19 I will split the audio here. Slide the clip on the track to match the timing of that sentence as noted earlier.
04:27 Choose the time-shift tool. Observe that the cursor is now a double-headed arrow.
04:33 I will shift the clip to this time. Remember, you have to go in the reverse direction, that is, starting from the last clip to the first.
04:42 This is because unless you create space, the previous clip cannot move from its position.
04:49 To start with the next narration, that is, narration of the next sentence, click on the Selection Tool. Click on any one of the channels on the timeline.
05:01 Now, click on the Record button to start... "साइलैब कंसोल विंडो को खोलिए". Now click on the Stop button to stop.
05:12 This second narration will come in another stereo track . Likewise, you can record different narrations which will be seen on different tracks.
05:22 Now, we will see how to merge all these narrations or how to bring them onto a single track. Choose the Time shift tool.
05:32 Select the audio clip by right-clicking on it and drag-and-drop it at the end of the first audio track. Similarly, do so for all the clips.
05:43 We can remove an audio track by clicking on the 'X' button in the label area. Let me remove the second audio track which is now empty.
05:51 While sliding the clips on the first track, remember to match the begin time of the clips to the begin time of the corresponding sentence, as noted earlier.
06:01 Once we have synchronized the beginning of each sentence with the corresponding time noted earlier, we can save our project. To do so, go to the File menu and click on Save Project As.
06:15 A dialog-box will open. Click on OK. Next it will ask for a file name. I am giving this file name "hindi _matrix_operation".
06:29 Next it will ask for the location where it has to be saved. I will choose Desktop and click on Save. This will save the project as a '.aup' file.
06:41 Finally, export the final project to the required audio format i.e. 'wav', 'mp3' and others.
06:49 To do that, go to the Menu Bar. Click on File. Choose the Export option. Click on it.
06:58 It will ask for a file-name. I will give the name as "scilab_hindi _matrix_operation".
07:06 Also, give the location where it has to be saved.
07:12 Next, choose the format for saving. I will click on 'ogg' format and then click on Save.
07:21 Next you will get a box called Edit Metadata. Here, you can add the artist's name and other information as per your requirement.
07:29 Click on OK. This will create your final audio file.
07:35 'ffmpeg' is an open source audio and video converter that supports most standard codecs. It can convert from one file format into another, quickly and easily.
07:48 The binary for 'ffmpeg' is available for download from: http://ffmpeg.org/.
07:56 Click on Download. Scroll down and choose the appropriate one.
08:09 To learn how to install packages in Linux, please watch the spoken tutorials on Ubuntu, available on this website. Once you have downloaded and installed ffmpeg,
08:21 you will be able to execute simple yet powerful commands to extract video or audio components separately from a media file or merge the video and audio from 2 separate media files into one.
08:37 Let me switch to the terminal window.
08:41 Let me type: pwd, 'present working directory', and press Enter. Displays my 'Present Working Directory'. The "ls" command will list all the files and folders which are present in this directory.
08:56 Let me change to the Desktop directory and "Test". Ctrl+L to clear the terminal screen, "ls" to list the files present in this directory.
09:15 Now, let me type the command - ffmpeg -i compiling.wmv TEST0.ogv.
09:30 The '-i' switch tells 'ffmpeg' that the file immediately after it, is the input file. 'compiling.wmv' is the input file here.
09:42 If the '-i' option is omitted, 'ffmpeg' overwrites that file when it tries to create the output file.
09:50 'ffmpeg' uses the extension of the output file to determine the output format and the codec to use. However, this can be overridden using command-line parameters.
10:03 We will look at some of these shortly. This command is very useful to convert a video from one format into another.
10:12 To execute this command, press Enter. But, I will skip this and proceed further.
10:18 Using the 'ffmpeg' command in the Terminal window, we can separate the video component from the original spoken tutorial.
10:26 To do so, type: ffmpeg -i functions.ogv -an -vcodec copy TEST1.ogv
10:45 The '-an' switch automatically removes all audio from the output and keeps only the video component. 'TEST1.ogv' is the output file.
10:59 Press Enter. Now we have separated the video component which means that the video is devoid of the original audio.
11:09 Let me open the 'Test' folder here. Here is 'Test1.ogv'. Let me play this file. <Play for 5-6 secs>.
11:25 Let me clear the terminal window once again. Now, let us type the command:

ffmpeg -i functions_hindi.ogv -vn -acodec copy TEST2.ogg.

11:54 The '-vn' switch removes the video from the output and keeps only the audio component. Press Enter to execute this command.
12:04 Now, we have separated the audio component which means that the output is devoid of the original video.
12:12 Let us check it. Let me open the 'Test' directory once again. Here is 'TEST2.ogg'. Let me play this. <Play for 5-6 secs>. OK.
12:26 So, let me close this. Let's go back to the terminal window. I'll clear the terminal window by pressing Ctrl+L.
12:35 Now, let us see how we can merge the audio which we saved with the video of the original tutorial.
12:42 In the terminal, we will type:

ffmpeg -i TEST1.ogv -i TEST2.ogg -acodec libvorbis -vcodec copy FINAL.ogv. Press Enter.

13:20 It is encoding now. Let me clear the terminal. Let me open the 'Test' directory. Here is 'FINAL.ogv', just as we saved.
13:34 Let me play this file now. <Play for 5-6 secs>. Simple!! isn't it?
13:46 Now, one can also use editing packages like KdenLive, Kino, LiVES and many others to replace the existing audio of an original spoken tutorial with a dubbed audio.
13:59 To make things easier for our dubbing contributors, we are in the process of creating a GUI application in Python
14:06 which executes all of the above 'ffmpeg' commands, that is, to Extract Audio, to Extract Video and to Merge.
14:15 The application and the spoken tutorial for the same will soon be available on this website.
14:22 That's all we have. Let me summarize the tutorial for you. Install Audacity once through Synaptic Package Manager.
14:30 Listen to the original tutorial and mark the begin time of each sentence. Open Audacity. Start narrating with appropriate pauses between sentences. Ideally, record in one go.
14:44 Split the audio into sentences. Starting from the back, slide the clips to match the noted timing.
14:52 When done, save the audio stream in 'ogg' format. Using 'ffmpeg' commands, separate the video component from the original spoken-tutorial.
15:04 Merge the dubbed audio and the separated video component to create the dubbed tutorial.
15:11 Spoken tutorial activity is the initiative of the ‘Talk to a Teacher’ project, coordinated by 'www.spoken-tutorial.org', developed at IIT Bombay.
15:25 Funding for this work has come from the National Mission on Education through ICT, launched by MHRD, Government of India.
15:34 For more information, please visit:

http://spoken-tutorial.org/NMEICT-Intro.

15:47 This brings us to the end of this tutorial. This is Sakina Shaikh and Nancy from IIT Bombay, saying Good-Bye and 'Thank you' for watching.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Pravin1389, Sandhya.np14, Sneha