Sections

Tag: download

The purpose of SNTRecorder is to assist in corpus recording. It was written to make speakers feel easier during the recording process, by allowing them to choose they own pace in pronunciation, but again not allowing sentences to be read too fast. Written in Python, with interface created in Tkinter (Tcl/Tk), it is a multiplatform tool, executable on Linux and Windows. Download SNTRecorder (source code, 48KB).

Compiled sentence where user is allowed to read it aloud

Assistance during a recording session

SNTRecorder is not a recording software, just a small utility that assists in the process. The best way to understand what this program do read the workflow description (taken from my MA paper about phonetics):

The project is loaded and the program creates the sentences and the time list, and then shuffles them.

A user sits in front of the screen and enters the initials.

The program shows a sentence and a red line in the lower part of the sentence screen. The sentence is crossed out at this step, as a signal to the speaker to read the sentence without saying it aloud.

The randomly selected time for the current sentence elapses and the red line changes to green, and the text appears normal.

The speaker pronounces the sentence and presses the “next” key to continue.

Steps 3 through 5 repeat until all sentences are recorded.

The program informs that the current session is over and asks if there is need to repeat some items. If answered yes, a window is shown to select the sentences and to repeat steps 3-6 for a given selection. The session ends once there is no re-recording.

A new user is ready and the cycle restarts.

Compiled sentence where user must wait to pronounce it

Speaker logs

The program creates a simple log for each speaker. Here is a sample of a log.

The log is preceded by time and speaker information. Random time indicates the brackets for selecting minimum and maximum values the user will be prevented to move to the next sentence. The log lines consist of the sentence that was shown on the screen, randomly selected time to prevent showing the next sentence, and finally the time when speaker pressed the “next” key.

Project settings, execution and OS difference

Main window of the program

To create your own project, just make a copy of sampleproject.py and leave it in the same directory. Then, edit the new file. The comments explain how to change the template sentence and insert new words. The file name (without extension) is you project name in the program. To change min and max time for users to wait between each sentence, edit TIMEMIN and TIMEMAX in project.py file.

To execute the program, go into src folder and type python3 sntrecorder.py. If your’re using Windows you’ll have to provide the full path to the file, usually something like C:\python32\python,exe, but it depends on Python version you are using (must be 3+).

Sound will not work on Linux (clicks for start and end of a sentence, which I doubt you might need). Also, you will need python3-tk library.

Program uses distinct strings for on-screen messages that are editable in language.py, and you can provide localized versions. An example, in Serbian, is already there.

As you can see, this is a small tool that I created to make the recording easier for students. Because this was just one of the tools I developed for my thesis, it is not user-friendly in terms of rich interface settings. But, thanks to open source and portability, you are free to adopt it to your requirements, with only a text editor and some patience. I hope you will find it useful.

It’s not always possible to find a good searchable phonetic dictionary. That is why I created a free and open source program that searches phonetically transcribed words and filters the results against some basic rules. It uses BEEP and Moby Hyphenator II sources.

Why I needed a searchable phonetic dictionary

For several month I have been working on my M.A. in experimental phonetics. One of the prerequisites is an acceptable corpus. My work is about the English diphthongs. However, diphthongs have to be pronounced after voiced plosives and before voiced/unvoiced plosives, and the words containing diphthongs should preferably be monosyllabic.

Making a corpus is not an easy task and it involves a painstaking search for suitable material. I had no searchable phonetic dictionary of any sort (a version of Macmillan Advanced Dictionary refused to work). It was a pure luck, then, to come across a paper where the bibliography listed one interesting source: University of Cambridge public FTP server. That is where I found BEEP and MH2 and decided to compile my own searchable dictionary, hopefully usable for the making the corpus.

What FONRYE is, and what it is not

FONRYE (named after fonetski rječnik in Serbian) is a very simple program (or script, if you like) written in Python 2.6. It is a specific piece of software I created for personal use: to search for diphthongs in a phonetic context. It does not have any fancy search rules or regular expression syntax. The plan was to use regexp, but it was very slow to run – I guess it can be improved if needed. So, please bear in mind that it was not planned for releasing: the code may contain strange comments, bad spelling etc.

Its settings are contained in the script itself, in 4 lines of code, which will be explained later. Here’s an example:

The user enters desired search conditions, executes the program, which then saves the results in a folder, accompanied by a short info.

FONRYE phonetic dictonary search, code view

How to use FONRYE

On Windows/Mac: Download Python, but a version lower than 3.0. The version 2.6 is preferred. On Linux: You already have Python installed, but make sure you have an “old” version as well (again, prior to the version 3).

Download FONRYE files, and unpack them. Please make sure you do not delete ‘results’ folder or the program will not work. On Windows go to Start menu and find IDLE inside Python folder. On Linux: Use any plain text editor which supports code editing, such as gedit. Or, install Python IDLE from your OS repository. Edit file run.py, enter your settings and save the file. Finally, run the program (double click run.py or press F5 in IDLE).

The program will start the search, and after it finishes the results will be in results/fonyre_results_n, where n is the search counter.

Settings and results format

In the step 3 above you opened run.py file. Here is how to enter the “settings”. First, locate these lines:

before = (),
after = (),
diphthongs = ()
syllable = 0

Do not modify anything except content inside the brackets and syllable number (that is, unless you are familiar with programming). By the way, syllable = 0 means words with 1 syllable, syllable = 1 with 2 syllables etc. Enter your phonemes in the brackets. For example, the settings:

…will search for all words containing diphthong ay (IPA: aɪ) if the diphthong is between b/d and p/t. After the search is done, go to ‘results/fonrye_search’ folder and locate search_info.txt (here is a vowel search info, a sample) – that is info about your search, including unique mark (ID) placed in all result files to keep track of the searches/results. The folder ‘files’ is where your searches are placed. For the provided sample search the program produced the following file/results:

Credits

I could create and use this little project, and place it on the Net, thanks to two people who provided the core of the project: a phonetic dictionary and a hyphenation dictionary. The phonetic dictionary was compiled by Toby Robinson from Cambridge University Engineering Department; Moby Hyphenation dictionary was created by Grady Ward. Both the projects were placed into the public domain in 1996. See Bibliography page for FTP addresses.

My credits are for some fast-writing not-so-good-looking slow Python code, which you are free to improve and share.