Resource icon

Calculating the Average Values of Your OTO.ini

Hey guys, here's a little trick I found for checking the average values of your oto.ini. If you're creating a base oto, this can be much more useful than simply guessing which values to set for each variable.

You will need:
- A fully oto'd section of a voicebank (does not have to be the entire bank)
- A text editor, like Notepad or Notepad++
- A spreadsheet editor, like Sheets or Excel

Step 1.

Open your oto.ini in a text editor. I use Notepad++. This is a sample from my English voicebank.
1622137056108.png

If you don't know how to read this, the oto is formatted like:
Code:
filename.wav=alias,offset,consonant,cutoff,preutterance,overlap

I oto'd this in setParam with negative cutoffs, so don't worry if yours are positive.

Step 2.

Select a section that you've fully oto'd and copy it into a new file. In my case, these English CVVC strings.

Now we need to transfer these values to the spreadsheet in such a way that each number will be in its own column. There are two ways to do this.

CSV Method:
Shoutout to @slashhearts for suggesting this; it's much faster than the Find and Replace method like I was doing at first.

Save the file with fully oto'd section as a .CSV (comma-separated value). Name it anything you want. I just named mine oto.csv.

Now, open the CSV file in your spreadsheet editor. You can either upload it to Google Drive to open it in Sheets, or open it directly in Excel. I'm using Sheets.

Because of the way that spreadsheet editors read CSVs, every value will now show up in a separate column in the spreadsheet. Neat!
1622266219212.png


Find and Replace Method:
If you don't want to mess with .CSVs, you can edit the text itself and manually copy it into your spreadsheet.

Press CTRL+H to bring up the Find and Replace menu. In the "Find what" box, write a comma [,], and in the "Replace with" box, put a TAB [ ]. Make sure it's an actual TAB character and not just several spaces; you may need to type one in the text editor and copypaste it.

1622137553391.png


Hit "Replace All", and your oto will now look like this:
1622137672392.png

If you want to separate the aliases, you can replace [=] with TAB as well. I went ahead and did that because it will make it easier to see which samples go with which values. If you're using the CSV method, you can replace it with a comma [,] instead.

Select the edited oto section and copypaste it into a blank spreadsheet. You do not need to save the edited oto in the text editor, and certainly not in the oto.ini file itself. Just like the CSV method, every value will be in its own column. Neat!
1622138043681.png

Step 3.

Now we need to organize them by sample type. If you're working with any kind of stringed reclist, it wouldn't be very useful to average, say, the offsets of every single sample, since they'll be widely different depending on the sample type. But, these different offsets come in handy; they should all be around the same value for each sample type in each string, so we can select the entire column (C in this case), and sort A→Z from the Data menu.
1622138239706.png

This should approximately group all the samples you'll want to average together. From here, it may still require some manual sorting; I don't know a faster workaround for it, sorry!

Step 4.

Insert a new row or two under the section you want to average. In the cell underneath the offset column, type the following formula:
Code:
=AVERAGE(AX:AY)
Where A is the column letter, X is the first row number, and Y is the final row number. In my case, I typed:
Code:
=AVERAGE(C1:C125)
If you want, you can format the cell to be a whole number by decreasing the decimal places, but it's not necessary.
1622138729506.png

Looks like my average offset for the initial CVs is 1204.

It can also be useful to check the median, which is the middlemost value of the data set. This should be about the same as your average, but maybe a few digits higher or lower. If it's wildly different, make sure you've grouped your samples properly. You can check it using the formula:
Code:
=MEDIAN(AX:AY)

Examining the range (the highest and lowest values) can also be helpful, so you know how much variation from the average you're dealing with, but there's no formula needed for that; just sort lowest to highest and use your eyeballs. Mode (the mathematics term) isn't super useful because you often run into cases where there are no repeating values.

Yay for math!

Step 5.

Copy and paste the cell into every other variable column. Sheets and Excel should both automatically adjust the forumula to be for column D, E, F, etc. So, here are my average values:
1622138835258.png

I can now use these in my base oto for every initial CV! I generally like to round to the nearest multiple of 25.

Keep in mind that the absolute value of the cutoff should always be higher than the consonant, which should always be higher than the preutterance, which should always be higher than the overlap. Basically, cuttoff > consonant > preutterance > overlap.

In this case, I would set the base oto values for every [-CV] sample to be something like:
Code:
1200,300,-475,150,50

If you want to be really precise, you can use the MROUND formula to have your spreadsheet round to the nearest multiple for you.

Repeat Steps 4 and 5 for every sample type you have. It can be a little tedious, but it's not very difficult. If I need to clarify anything, please feel free to drop a comment.
Author
FelineWasteland
Views
107
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from FelineWasteland

Latest updates

  1. Alternate Method Added

    Added an alternative to replacing commas with TABs by simply saving the oto as a .CSV file.