[mary-dev] [mary-users] Running VoiceImportTools in Eclipse

Ingmar Steiner ingmar.steiner at inria.fr
Mon Sep 12 17:10:22 CEST 2011


Dear Jerome,

I think at this point this discussion should be moved to the mary-dev 
list. Can I ask you to subscribe there and not send any more replies to 
mary-users unless they pertain to *using* the voice import tools, and 
not to debugging or modifying any source code?

On 12.09.2011 16:06, Jerome Perri wrote:
> Hello all,
>
> I am not sure anymore where I changed something.
> I think it was in 3 places (please search for "Jerome" in the code below).

This is going to get extremely tedious unless you use some form of 
source code management to track changes etc. I suggest a clean checkout 
of the 4.x-branch from the svn repository using a git/hg/bzr bridge or 
similar. That would make it easier to understand and reproduce what 
you're doing and to help you debug.

I don't necessarily agree with your idea of splitting "t" into three 
different allophones or something, but at a higher level, the need to 
extend a given allophone set might be justified in certain cases. I'm 
not making any promises, but perhaps I can point you in the right 
direction once I understand exactly which changes you're making toward 
such a goal, and what goes wrong.

In any case, you should certainly attempt only a very small allophone 
set extension at first, one or two at most. If you can get that working 
as desired, *then* you can address scalability issues (which might 
include changing from byte-valued to short-valued feature processor).

Best wishes,

-Ingmar

>
> I need to track down where exactely this breaks something.
> I think the first place where I noted something wrong what that
> halfphoneunitname was listed on the very bottom of the list in the
> FeatureSelection part of voice import tools.
>
> Need to investigate that further and will send the results now that I
> can debug voice import tools.
>
> Jerome
>
> /**
> * The unit name for the given half phone target.
> * @author Marc Schröder, changed by Jerome Perri
> *
> */
> public static class HalfPhoneUnitName implements
> ShortValuedFeatureProcessor //Jerome changed from ByteValuedFeatureProcessor
> {
> protected String name;
> protected ShortStringTranslator values; //Jerome changed from
> ByteStringTranslator
> protected String pauseSymbol;
>
> /**
> * Initialise a UnitName feature processor.
> * @param name the name of the feature
> * @param phoneset the phonetic alphabet used
> * @param segmentNavigator a navigator returning a segment with respect
> to the target.
> */
> public HalfPhoneUnitName(String[] possiblePhonemes, String pauseSymbol)
> {
> this.name = "halfphone_unitname";
> this.pauseSymbol = pauseSymbol;
> String[] possibleValues = new String[2*possiblePhonemes.length+1];
> possibleValues[0] = "0"; // the "n/a" value
> for (int i=0; i<possiblePhonemes.length; i++) {
> possibleValues[2*i+1] = possiblePhonemes[i]+"_L";
> possibleValues[2*i+2] = possiblePhonemes[i]+"_R";
> }
> this.values = new ShortStringTranslator(possibleValues); // Jerome
> changed from ByteStringTranslator(possibleValues);
> int blah;
> blah=1;
> }
> public String getName() { return name; }
> public String[] getValues() { return values.getStringValues(); }
> public short process(Target target)
> {
> if (!(target instanceof HalfPhoneTarget))
> return 0;
> HalfPhoneTarget hpTarget = (HalfPhoneTarget) target;
> Element segment = target.getMaryxmlElement();
> String phoneLabel;
> if (segment == null) {
> phoneLabel = pauseSymbol;
> } else if (!segment.getTagName().equals(MaryXML.PHONE)) {
> phoneLabel = pauseSymbol;
> } else {
> phoneLabel = segment.getAttribute("p");
> }
> if (phoneLabel.equals("")) return values.get("0");
> String unitLabel = phoneLabel + (hpTarget.isLeftHalf() ? "_L" : "_R");
> return values.get(unitLabel);
> }
> }
>
>

-- 
Ingmar Steiner
Postdoctoral Researcher

LORIA Speech Group, Nancy, France
National Institute for Research in
Computer Science and Control (INRIA)


More information about the Mary-dev mailing list