Disclaimer
The description of the add-on below is already made by me on our site, but there the article is written for users. Here I would like to convey the idea to someone from adult software developers who will not enter our website in life. Both the goal and the audience are completely different, therefore, by no means - in my, of course, humble opinion - it does not pull on a dull perepost. Here it is. Who thinks the same way - welcome under cat.
Why translator media player?
Not exactly then, why, for example, the average user. He can listen to a) music; b) podcasts; c) to porn (I don’t know exactly what is the point of listening to it, but Rule 34 is the same); d) damn what else, but all of these use cases require the program to have a specific and generally identical set of functions (previous / next track, playlist, equalizer, etc.) and corresponding controls and hot keys for all. The translator listens - in addition to points (a) - (d) above, for which the “special” is not necessary - still beloved himself, and not for the purpose of narcissism, but quite the contrary, for the purpose of critical thinking about his own - or, if we are talking about Audit, someone else - work.
I’ll say right away that laziness has taken its toll, and before I sat down to write code (well, not mine, after all), I tried to find some ready-made program. Did not take off, ordinary powders refuse to wash. Here are some difficult spots they have failed:
1. Sound files are usually very long: the session of the event being translated lasts an hour and a half, but sometimes there are three hours without a break, the length of the file is appropriate. For modes (a) and (b), this is rather an exception (even live recordings have long been fighting for tracks, I have a record - Jethro Tull, Thick As A Brick, 20:08); for (c), a very desirable property, but, while maintaining the quality of the material, difficult to achieve; for materials listened by translators - rather the rule. Using the “previous / next track” functions in this case does not work (and is not needed at all), and traveling back and forth through such a file by some slider in the user interface is a very nasty pastime, at least because with such a file length each shaking hands on a slider can "cost" plus or minus a dozen seconds.
')
2. You need to listen to two files at once - the original and the translation. To assess the quality of the translation without hearing the original is silly; the reverse doesn’t make any sense at all. Open two players or constantly jump from one file to another - see above. To open one player in case of 3 (b) - see below - it is possible, and even some kind of analysis of such an audio stream can also be done, but at the same time listening and trying to analyze two texts in different languages ​​is a very serious memory strain, playing one and the same piece will need to be sooo often - see above. The correct way is to listen first to a short segment of the original, then to the corresponding segment of the translation (that is, simultaneous translation in the recording becomes almost consecutive).
3. Original and translation may arrive in different form (s) x. In general, there are three ways of recording simultaneous translation at this stage of the revolution:
- a. the original is written separately, the translation is separate (for example, if the sound engineer on the instructions of the event organizer writes only the original, and the translator writes his own work on his own laptop / recorder / dictaphone);
- b. the original and the translation are written into one sound file (for example, the paths of the Russian and English channels are added to the left and right channels of the stereo recorder);
- c. One language is written into one sound file, another into another (for example, bourgeois webinars are broadcasted to a Russian audience most often based on the “only Russian” principle: Russian-language reports in original, English-speaking - in translation; in this case, two recorders are used for recording , then when installing the sound of translation is superimposed on the video report).
4. Only in case of 3 (b), one can expect that both audio streams that will be given to the translator for analysis are synchronized, that is, playing 1128 seconds of translation, we hear the translator reacting to 1128 minutes of the original. In the two remaining cases, one can hope for synchronization, it is impossible to count. But while listening, you still want simultaneity: are we not witches or witches? synchronists or not? Moreover, one of the variables for assessing the quality of translation is the delay between the original and the translation, and it makes sense to consider it only during synchronization. It should be borne in mind that few of the translators are able and willing to use programs that allow to cut off the “tails” of audio files.
5. Quite often when listening there is a feeling that here you did something wrong, but you can’t articulate what specifically (option 2 - you really liked the translation version you just heard, and they should definitely share it with the world). This is usually treated (option 2 - aggravated) by listening to the same segment again after a while. So, it is necessary to write down what segment aroused interest, that is, put a bookmark. And if there is a task to parse the translation of an entire session, there may be more than a dozen such segments - plus parsing can be quite far from listening, - so it would be good to save all the bookmarks set for this file, and later when opening it, load them so that do not do the same job twice.
6. Since within one session the translation goes mostly to both sides (the report in Russian is questions in English - the answers in Russian are the next report in English - etc.), the Russian and English files will in turn be the original then translate. When parsing, the original should always be played before the translation (see p. 2), so we need the function of quickly changing files in places.
7. Since the boundaries of the segments may fall in the middle of a semantic group or even in the middle of a word - and also because, depending on the software and / or acoustics used, the first half second-second after silence the volume may be incomplete, the next segment should not be played from the end previous, but with overlap. Comfortable overlap - three seconds, although it is IMHO.
With all these functions the media player Conscience of the Translator was made. It was made in the form of an add-in of MS Word, since its author did not learn anything else in programming. All audio functionality is implemented only through mciSendString, which opens two different players - mysound and mysound1 and produces standard manipulations with them. Based on the specifics of the Word, only the implementation of the alternate operation of two players forced me to break my head. It was decided by the OnTime method, after a second, launching the same PlayAlternate procedure, which looks at the statuses of both players and decides to leave them alone and look again after a second, start the first with such and such a second or so with the second. such and such. Strictly speaking, the implementation is imperfect: OnTime timers can not operate with more than one at a time, and in the event of a conflict, the last running one remains alive, and if some other timers are running on the computer via VBA, for example, in daily procedures Normal ¬- PlayAlternate timer destroys them without declaring war, and the user then wonders why the currency rates in Word are not today's (I wrote this add-on when I worked at RIA Novosti). But I did not find any other ways in Word.
All data about the bookmarks (and generally everything that needs to be saved - for example, the last file being played) is written into the custom document (CustomDocumentProperties) properties of the active document (this is an empty document opened by the Word based on the template; if you write the whole project in the document and not the template, this document will always be considered active) and will be saved along with it with the format name “Interpretation_Analysis_Report”. For fidelity, all the information to be saved is printed in the text of the document: suddenly the analysis will be done on ordinary players, then at least, looking at the piece of paper, you can open the bookmarks immediately and not listen. stop-stop-stop, but where was it? "
Separately, I had to beat the Vord with my feet in order to implement hotkeys via VBA. One control - in this case, the Play / Pause button - has been assigned a private procedure for handling all key presses when the focus is on it. Hot keys are hardcoded and displayed on user form - it was too lazy to write a separate large part of the code for any three perverts who, like all normal people, do not want to use the bottom line of QWERTY. And the focus is transferred to this button at the end of each - in general, each - procedure: whatever we do, the last step - “yes, by the way - and the focus is transferred to the Play / Pause / Resume button”. Surely there is some less surgical way, but this one, in any case, works.
The Step list sets the duration of the segment being played. By default, a normal translator can keep 30 seconds of speech in his head without using notes; in a segment of shorter duration, the context may not be enough, and the beginning of the minute segment towards its end can be forgotten (at the “normal” speech rate, this is about two-thirds of a page of text, we all remember school grades on reading technology, when reading slower than 120 words per minute were state crime So, this is a comfortable pace of speech - not reading - a professional speaker). But the opportunity to choose the length should still be: maybe the speaker’s speech rate is very fast or, on the contrary, very slow.
The Sync list makes it possible to compensate for the difference in the start time of two files. It happens, for example, because before turning on the chairman’s microphone and saying, “Good morning, dear colleagues,” the translator turned on the recording a little beforehand, so as not to be distracted during the process, and the sound engineer on the console turned on the recorder exactly before how to send sound to the speakers. Or vice versa. Then run after the organizers and ask for the cropped file - a) will not give, b) you forget yourself, c) you feel sorry for the time. One day of the conference, even in MP3, is under a gigabyte; I already wrote about using the cropping programs - I don’t have it. And so the method of scientific spear with two or three times synchronization is obtained; it is then saved in the appropriate document, of course, and this pair of files will be loaded with this synchronization next time. Positive values ​​correspond to the “delay” of the translation file. As a rule, the difference is two or three seconds, but just in case I entered 60 seconds to the list in each direction, which I feel sorry for.
Otherwise, the standards from the thick book “Word 2000. Developer's Guide”, probably, there is no much point in describing them, since the implementation is the same as in all other players. The code is documented as I could, do not throw stones.
Now about the deep meaning of writing this post. Of course, not to boast - not the audience. And try to arouse interest in writing a normal, adult player for, for example, tablets and smartphones. Here I, for example, spend a lot of time behind the wheel, and this time could be spent with benefit - to listen to translations and place bookmarks. In its current form, it is necessary to open the laptop, put it in the passenger seat, fix it so that it does not fly away from the brakes under the seat, open the Word and connect it to the car’s audio system. In general, the whole thing. And if such a player stood on a smartphone, which I connect in any case, because navigation and handsfree, life would be much easier and more productive. My file can be taken
from here .
I cannot promise the author of an adult “Conscience of a Translator” to a large audience: in Russia there are hundreds of four people, in the world there are ten thousand, probably. But then, unlike 97, as I recently heard already from Bob Dorf himself, percent of downloads, no one will demand free of charge from this one. She even has the right to be very expensive: they will survive. Well, I can take it.