Solved: How to create your own Glossika-like GSR files?

All about language programs, courses, websites and other learning resources
User avatar
neumanc
Orange Belt
Posts: 134
Joined: Sat Jul 18, 2015 11:19 am
Location: Düsseldorf (Germany)
Languages: Speaks: German (native), English, Dutch
Studies: French (advanced), Spanish (false beginner)
Mostly forgotten: Italian, Latin
x 441

Re: Solved: How to create your own Glossika-like GSR files?

Postby neumanc » Mon Jul 30, 2018 11:13 am

Jim wrote:I got this working last night and it really is a fantastic piece of software. In case it helps anyone else, when running the code I received the following error:
Automatic encoder selection failed for output stream #0:0. Default encoder for format mp3 (codec mp3) is probably disabled. Please choose an encoder manually.
I haven't a clue how to solve this (again it may be a mac issue, I don't know), but I worked round it by changing the code so that the output format was "wav" and the output file names added ".wav". I can then convert the wav files to mp3 using iTunes with no bother.

As a suggestion, you might extend the input filetype to other types such as m4a or aiff and give the user the option of selecting an output in a different filetype, but this now works well for what I was looking to do. Many thanks again.
Hello Jim, thank you for trying this out and for your suggestion. I suppose that this error is due to problems with the software used by "Pydub" to create the sound files. That is either "libav" or "ffmpeg". This should be remedied if the user has the possibility to chose the output format, which shouldn't be too difficult to implement. I will certainly include this in the next version. Furthermore, I plan to put this software on Github for others to contribute as suggested by rdearman. I just need the time to do so.
3 x

User avatar
neumanc
Orange Belt
Posts: 134
Joined: Sat Jul 18, 2015 11:19 am
Location: Düsseldorf (Germany)
Languages: Speaks: German (native), English, Dutch
Studies: French (advanced), Spanish (false beginner)
Mostly forgotten: Italian, Latin
x 441

Re: Solved: How to create your own Glossika-like GSR files?

Postby neumanc » Mon Jul 30, 2018 11:26 am

juman wrote:Hi,

I'm trying to test this out but must have misunderstood something. I have the script in a folder with audio pairs (L1 = EN, L2 = FR) named EN-1.mp3, FR-1.mp3, EN-2.mp3, FR-2.mp3 etc. However I get an issue when I run the script with mainly default parameters :

Code: Select all

1. What is your project title? Test
2. What is your source language? EN
3. What is your target language? FR
4. How many sentence pairs do you want to process? 5
5. Do you have ready-made cues (or else shall they be created) (y/n)? n
   Desired cue length (in seconds)? 0.5
   Desired length of additional fade-out (in seconds)? 0.2
6. Is the raw data stored in the current folder (y/n)? y
7. Do you want all standard preferences (y/n)? y


When it starts it begins with the following :

Code: Select all

Soundfiles will now be created.

Preliminary step:  5  cue files will be created.
Creating: EN-1.mp3
Creating: EN-2.mp3
Creating: EN-3.mp3
Creating: EN-4.mp3
Creating: EN-5.mp3
Completed in 00:01 hours.

Step 1:  5  sentence pair files (e.g. for shuffle play) will be created.
Test-EN-FR-1.mp3
Test-EN-FR-2.mp3
Test-EN-FR-3.mp3
Test-EN-FR-4.mp3
Test-EN-FR-5.mp3
Completed in 00:01 hours.


When I then check my original files the EN-x.mp3 files have been overwritten with the FR-x.mp3 files and the resulting files is only in French?
Hello juman, thank you for trying out the script. It is correct to have the source and the target language files in the same folder. However, you answered the question "Do you have ready-made cues (or else shall they be created) (y/n)?" with "n". This option is used to create monolingual files, where the beginning of the target language files is used as a cue for the respective target language sentences. If you want to have bilingual sentence pairs like the original Glossika files, you have to answer the question with "y", since you do have ready-made cues, namely the English-language files. I am sorry that the interface of the program is not yet as clear as it should be, but this is software in development. This also shows me how necessary it is to create a documentation and help file. At the moment, I just don't have the time for further development. But I will certainly return to this later on.
1 x

juman
White Belt
Posts: 24
Joined: Sat Nov 14, 2015 4:36 pm
x 33

Re: Solved: How to create your own Glossika-like GSR files?

Postby juman » Mon Jul 30, 2018 9:12 pm

Hi,

Thanks for the feedback. Yes, that helped now it works! A really good script you have created! I'm a beginner so creating a more beginner friendly material than Glossika offer is what I will try out now :-)
1 x

User avatar
Voytek
Green Belt
Posts: 407
Joined: Fri May 13, 2016 3:36 pm
Location: Chiang Rai (Thailand)
Languages: polski (N)
English(C2)
español(C2)
svenska (C1)
日本語 (A1)
ภาษาไทย (dabbling)
x 346

Re: Solved: How to create your own Glossika-like GSR files?

Postby Voytek » Mon Jan 06, 2020 1:24 pm

neumanc wrote:Hello everybody



Hello.

It's an interesting tool I would like to give a try but I've encountered this issue:
Image

Any ideas on how to solve the problem?

Thank you in advance. I really appreciate the effort you put into creating the tool and the willingness to share it with others.
0 x
Exposure to Swedish-RL-building stage: 30 / 300
Exposure to Spanish-RL-final stage: 300 / 1500

User avatar
neumanc
Orange Belt
Posts: 134
Joined: Sat Jul 18, 2015 11:19 am
Location: Düsseldorf (Germany)
Languages: Speaks: German (native), English, Dutch
Studies: French (advanced), Spanish (false beginner)
Mostly forgotten: Italian, Latin
x 441

Re: Solved: How to create your own Glossika-like GSR files?

Postby neumanc » Mon Jan 06, 2020 11:55 pm

Voytek wrote:
neumanc wrote:Hello everybody



Hello.

It's an interesting tool I would like to give a try but I've encountered this issue:
Image

Any ideas on how to solve the problem?

Thank you in advance. I really appreciate the effort you put into creating the tool and the willingness to share it with others.
Hello Voytek, I am sorry you encountered this problem. I believe that thus is the same problem Jim had, look above to my answer from July 30th, 2018, where I quoted him. The software used by Pydub to created mp3-files (libav or ffmpg) does not work on your machine for whatever reason. This could quite easily be remedied by incorporating the possibility to choose the output format. I promised to implement this, but unfortunately, I haven't got around to it so far. For the time being, you could ask Jim to send you his work-around. He altered the script so that the output-files are wav-files. This is certainly not a perfect solution, since you will get very large output files, however it seemed to have worked for him. Maybe you could also play around with other sound file formats, for example ogg. The best solution however would be to get the program working that should produce the mp3-files. I myself have installed libav on my machine. Maybe you could try this also?
1 x

User avatar
neumanc
Orange Belt
Posts: 134
Joined: Sat Jul 18, 2015 11:19 am
Location: Düsseldorf (Germany)
Languages: Speaks: German (native), English, Dutch
Studies: French (advanced), Spanish (false beginner)
Mostly forgotten: Italian, Latin
x 441

Re: Solved: How to create your own Glossika-like GSR files?

Postby neumanc » Tue Jan 07, 2020 12:00 am

neumanc wrote:2. How to install Libav (Pydub relies on Libav, so this needs to be done)
a) Go to http://builds.libav.org/windows/nightly-lgpl/ to get the newest nightly build of Libav. Choose the newest file at the bottom of the page. At the time of writing, this is libav-x86_64-w64-mingw32-20180108.7z dating from 8th January 2018. Download it by clicking on it. Warning: This is a nightly build, so it may contain errors. The latest release version can be found at http://builds.libav.org/windows/release-lgpl/, but it's already three (!) years old.
b) Extract the downloaded 7z-file somewhere on your computer where it won't be deleted. You will need the freeware "7-zip" for this, which you can download at http://www.7-zip.de.
c) Open the folder that contains the extracted files. Within this folder, open the sub-folder usr, then the sub-sub-folder bin. Click on the address bar and copy the path to this sub-sub-folder (CTRL-C).
d) Still using the Windows Explorer, search on the left sidebar for This PC and right-click on it. A context menu will open, where you click on Properties.
e) A new window will open where you can "View basic information about your computer". In this window, on the left sidebar, click on Advanced system settings.
f) A new window will open called System Properties, where you must click on Environment Variables.
g) A new window will open called Environment Variables. On the bottom, you will find the System Variables. Click on the system variable Path.
h) A new window will open where you can edit the environment variable. Click on New and paste the path to the above-mentioned sub-sub-folder bin. Save and close everything.
1 x


Return to “Language Programs and Resources”

Who is online

Users browsing this forum: No registered users and 2 guests