FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ssb22/gradint
  • st822/gradint
2 results
Show changes
Commits on Source (371)
Showing
with 1673 additions and 238 deletions
*~
__pycache__
This diff is collapsed.
This diff is collapsed.
File moved
......@@ -7,9 +7,8 @@ import os, py_compile, sys
# can take more RAM than doing it separately.
f=os.getcwd()+os.sep+"gradint.py"
a=0
try: a=open(f)
except: pass
except: a=0
if a:
print "Compiling gradint..."
del a
......@@ -44,7 +43,8 @@ def moveFiles(srcDir,destDir):
except:
if not destDir in fail:
fail[destDir]=1
raw_input("Failed to write to "+destDir)
raw_input("Problem writing to "+destDir)
raw_input("from "+srcDir)
raw_input("Please do it manually in Explorer")
raw_input("or remove Application Lock if on")
try: os.rmdir(srcDir)
......
# Script to load gradint's synthloop quickly without waiting for the GUI
import sys
sys.argv.append("useTk=0")
import gradint
gradint.primitive_synthloop()
File moved
If you want to make your samples quieter to match the lower
volume of PythonS60's audio.say() command, you can do this
on Unix (it doesn't matter if this command is repeated) :
find synth-cache samples -name '*.mp3' -exec mp3gain -a -m -12 '{}' ';'
and for any partials voices (Yali etc) using audiodata.dat
(see advanced.txt) you can do something like this (once only) :
grep -a '^[0-9]\+ .*\.raw$' audiodata.dat > /tmp/audiodata.dat &&
grep -av '^[0-9]\+ .*\.raw$' audiodata.dat | sox -t raw -r 44100 -c 1 -s -2 - -t raw - vol 0.2 >> /tmp/audiodata.dat
ls -l audiodata.dat /tmp/audiodata.dat # check they're the same length
cp /tmp/audiodata.dat .
S60's English synth isn't always clear. To help, the text
is also displayed on screen, but it's not very big. If you
need to run Gradint without looking, it might be better if
you can generate the lessons on another machine (with a
clearer English synth), or pre-cache the English.
......@@ -3,7 +3,8 @@ gradint build instructions
See Makefile for what you can do.
As a GPL program, gradint can include parts of other GPL programs.
See README-license.txt for licensing notes (and for a note on why the
Mac and Windows bundles cannot be upgraded to eSpeak-NG)
You will need 7-Zip for making the Windows version
(so you'll need to be running on x86 Linux or Cygwin).
......@@ -12,9 +13,9 @@ windows/7zS.sfx is the stub for 7-zip self-extracting files
updated versions still work with gradint's 7zip setup file). 7zip is LGPL.
windows/gradint contains quite a few files that were output by compiling an
earlier version of gradint on py2exe under python2.3 (both of which are GPL)
on a Windows box. Those files are: datetime.pyd _sre.pyd w9xpopen.exe
winsound.pyd library.zip gradint-wrapper.exe python23.dll. In order to
earlier version of gradint on py2exe under python2.3 on a Windows box.
Those files are: datetime.pyd _sre.pyd w9xpopen.exe winsound.pyd
ibrary.zip gradint-wrapper.exe python23.dll. In order to
avoid having to use a Windows box with py2exe every time (and note py2exe
with Python 2.5 requires Administrator access to the Windows system to
install, so it's no good running that in an average university login
......@@ -29,23 +30,20 @@ and using only the libraries provided in that library.zip file. (It can
attempt to import other libraries, but it must have a fall-back mechanism if
they're not there, as they almost certainly won't be there on Windows.)
windows/ also contains a copy of ptts.exe (extracted from Jampal from
jampal.sourceforge.net with is GPL) and madplay.exe (I can't remember how I
got this binary but I know madplay is GPL).
The Windows setup will install to Program Files\gradint on Windows 9x and
%HomePath%\gradint on later versions. The start menu and desktop
"shortcuts" are all batch-file hacks because I haven't made a "real" Windows
%installer, but it should be OK on most systems.
start-gradint.app contains the Mac files. It has a binary of qtplay which
is redistributable (see qtplay.copyright), and also a Finder script that
start-gradint.app contains the Mac files. It has a Finder script that
starts gradint.py in a Terminal.
(qtplay is compiled for PowerPC; Intel macs should automatically use the
emulator.)
riscos.zip contains a copy of !PlayIt (which is re-distributable) and a
riscos.zip contains a copy of !PlayIt, which is re-distributable on a
"no commercial use" license. If that were combined with Gradint then
) and a
compiled version of the Wenhua binary (which is GPL and related to gradint -
see vocab.txt). It's important not to re-create riscos.zip except by using
a RISCOS-aware zip program (such as on RISC OS itself) otherwise the RISC OS
......
Licensing notes
---------------
As a GPL program, Gradint can include parts of other GPL programs.
It is possible that many of these programs could be included anyway
even if Gradint were not GPL, since they are optional and are run as
system commands independently of the Gradint process: this seems to
fit the "mere aggregation" clause of the GPL. However, Gradint's use
of eSpeak may be a 'borderline' case, as may be the Windows version's
use of py2exe, so I feel the safest thing is to make Gradint GPL too.
I could make a more liberally licensed version of the Gradint core
code without the parts that drive eSpeak etc. This liberally-licensed
core code would then be includeable in the whole GPL version and also
in other non-GPL projects. To keep things simple, I have not made
such a division by default (the Gradint GUI displays "GPL" because
it's usually associated with eSpeak, and to save screen space I don't
want to change that to "whole thing's GPL but some parts are Apache"),
but contact me if you need me to make or approve a cut-down version of
the code containing just the parts that don't have to be GPL, probably
as a separate project.
The GPL allows commercial use, and it does not allow the removal of
any permissions it grants, including the permission for commercial
use. Therefore, it is NOT allowed to take a GPL program together with
a program that's distributed under a "non-commercial use only" license
and distribute the combined version, unless it falls under the GPL's
provision of "mere aggregation". (I could give special permission,
but my permission would not be valid if the above "borderline" cases
really do mean that Gradint must be GPL with no extra permissions.)
The Windows and Mac versions of Gradint include not only eSpeak but
also some customised dictionary files, one of which contains
pronunciation data derived from the OALD with a "non-commercial only"
license. Since eSpeak's dictionary is a user-customisable file loaded
at runtime, and does not make up part of eSpeak's code proper, it is
arguable that making a non-commercial download of eSpeak + OALD is
"mere aggregation" allowed by the GPL. However, there is also the
issue that this modified dictionary was derived not only from the OALD
but also from eSpeak's original data files, including en_rules which
is explicitly GPL, so I would need special permission to combine this
with OALD in a non-commercial binary (otherwise I would have to ship
the files separately and have eSpeak combine them at runtime).
Thankfully though, I do indeed have special permission, because I
collaborated with eSpeak's original author Jonathan Duddington (to
help improve eSpeak's English, Mandarin and Ancient Greek voices and
port it to Mac and PocketPC), and he was happy for my pre-compiled
"non-commercial only" combination to go into Gradint's downloads.
This does however mean these Mac and Windows bundles cannot be
upgraded to eSpeak-NG, since the special permission I received from
Jonathan to make a "non-commercial" OALD-integrated download applies
only to my use of his original eSpeak data: the eSpeak-NG contributors
were not informed. Anyway, my process for adding OALD entries to the
eSpeak data has not been as thoroughly tested on recent versions of
the eSpeak-NG data. Gradint can however work with eSpeak-NG if you
supply it separately, and it is possible that eSpeak-NG's improvements
in its default data have reduced the need for OALD data anyway,
although I'm still choosing to ship old-eSpeak plus OALD in my
Mac and Windows 'bundle' downloads.
windows/ contains a copy of ptts.exe extracted from Jampal from
jampal.sourceforge.net with is GPL, and madplay.exe (I can't remember
how I got this binary but I know madplay is GPL), and now LAME.
qtplay is used by Gradint on OS X 10.4, which lacks afplay.
We bundle qtplay with the Mac version, and it has a BSD-like license
(see qtplay.copyright for details).
Mac and Windows additionally ship SOX which is GPL.
To save on server space, I have not included the source code to the
third-party free software binaries I ship. This is possible because
I am performing an unmodified non-commercial distribution of binaries
whose source is widely available and can easily be found on the
Internet, which is something explicitly allowed by the GPL
(GPLv2 section 3c, GPLv3 section 6d). If anyone has difficulty
obtaining source code for any of these binaries then please let me know.
# gradint
Graduated Interval Recall program from http://ssb22.user.srcf.net/gradint
(also mirrored at http://ssb22.gitlab.io/gradint just in case)
Gradint is a program that can be used to make your own self-study audio tapes for learning foreign-language vocabulary. You can use it to help with a course, to prepare for speaking assignments, or just to keep track of the vocabulary you come across.
Gradint uses a variant of the “graduated-interval recall” method published by Pimsleur in 1967. It’s like audio flashcards that appear in a special pattern designed to help you remember. The Pimsleur accelerated language courses use several techniques (they say some are patented), and Gradint does not imitate all that, but this particular 1967 idea is now in the public domain so Gradint can use it to help you learn your own choice of vocabulary.
Gradint gives only audio, so you concentrate on pronunciation. (And so you can listen during daily routines e.g. washing etc, since you don’t have to look or press buttons during a lesson.) Gradint can write its lessons to MP3 or similar files for you to hear later, or it can play them itself and try to adapt to emergency interruptions. The words it uses can be taken from real sound recordings or they can be synthesized by computer. You can add words to your collection at any time, and Gradint can manage collections of thousands of words (and supports batch entry). It can also help you rehearse longer texts such as poems.
Gradint is Free/Libre and Open Source Software distributed under the GNU General Public License (GPL v3).
The Gradint home page (linked above) contains installers for various platforms and details of how to run them. This repository contains the Gradint build environment, including a `Makefile` that can create these installers by packaging up versions of the Python script for various environments (Windows, Mac, Linux, Windows Mobile, S60, Android, RISC OS) plus utilities for running Gradint on a server. Not all of Gradint's functions are available in all environments.
If you are learning Chinese, you might also want Yali Cheng’s Mandarin voice or Cameron Wong’s Cantonese voice. Installers for these may also be found on the Gradint home page, and source in my separate Git repositories `yali-voice`, `yali-lower` and `cameron-voice`. They are larger downloads but less "robotic" than the eSpeak voice.
Once you have installed Gradint, you must tell the program which language(s) you want to learn. On most systems, Gradint will show a GUI which lets you do this. You can also edit the file `settings.txt`.
Then you can give the program some words and phrases to teach. This can be any combination of real recordings and computer-synthesized words, and you can always add more later. You can use the graphical interface (on supported systems), or you can place real recordings in the samples directory and its subdirectories (see the file `README.txt` in the `samples` directory), and add words that you want synthesized by computer to vocab.txt (see the instructions in `vocab.txt`).
If possible, prepare some audio prompts such as “say again” and “do you remember how to say”. These can be real recordings or synthesized text. Some text for English and Chinese is already provided. For any other language you should ideally add your own; for details of how to do this, see the file README.txt in the prompts subdirectory of the samples directory.
You should then be able to run the program every time you want a lesson. For more advanced things, see the settings in the file advanced.txt.
Citation: Silas S. Brown and Peter Robinson. Addressing Print Disabilities in Adult Foreign-language Acquisition. In: Proceedings of the 10th International Conference on Human-Computer Interaction (HCII 2003, Crete, Greece), Vol.4: Universal Access in HCI, pp 38-42.
File moved
#!/bin/bash
# Sync gradint build environment to SVN
wget -N http://people.pwf.cam.ac.uk/ssb22/gradint/gradint-build.7z || exit 1
rm -rf gradint
7z x gradint-build.7z || exit 1
diff -r gradint-build gradint|grep "^Only in gradint-build"|grep -v \\.svn|sed -e 's,Only in ,svn del ",' -e 's,: ,/,' -e 's/$/"/'|bash
cp -pur gradint/* gradint-build/
find gradint|grep -v \\.svn|sed -e 's/gradint/gradint-build/' -e 's/^/svn add "/' -e 's/$/"/'|bash
rm -rf gradint gradint-build.7z # if need to save space
if test "a$Msg" == a; then export Msg="Gradint update"; fi
svn commit -m "$Msg"
This diff is collapsed.