Code/VoiceData.cs
#nullable enable
namespace SharpTalk
{
[System.Serializable]
public sealed class VoiceData
{
public short PitchHz = 104;
public float TractScale = 1.0f;
public short PitchRange = 120;
public short StressGain = 60;
public short Rate = 160;
public short VoiceType = 0;
public short VGain = 60;
public short AGain = 0;
public short ACycle = 192;
public short TremoloDepth = 0; // 0-100; maps to Frame.TremDepth byte (÷100 → 0.0-1.0)
public short TremoloRate = 0; // 0-200; maps to Frame.TremRate byte (÷10 → 0-20 Hz)
public short F4Freq = 3650;
public short F4BW = 200;
public short F5Freq = 4500;
public short F5BW = 250;
public short F4pFreq = 3650;
public short F4pBW = 150;
public short F5pFreq = 4200;
public short F5pBW = 100;
public short F6pFreq = 4500;
public short F6pBW = 150;
public short NasalBase = 330;
public short NasalTarg = 400;
public short NasalBW = 60;
public short Locus = 55;
public short BwGain1 = 135;
public short BwGain2 = 110;
public short BwGain3 = 100;
public short F1_Offset = 5;
public short F2_Offset = 15;
public short F3_Offset = 15;
public short Chorus = 0;
public short NGain = 100;
public short SPitchMidi = 0;
public short SGain = 0;
public short AsperW = 2;
public short VoiceVers = 3;
public short NasalAmt = 0;
public short EmphVoice = 1;
public short RvbDelay = 35;
public short RvbDepth = 0;
public short WaveType = 0;
public short[] VWave = new short[]
{
0, 8778, 6555, 3787, 1955, 1231, 865, 724, 563, 500, 444, 420, 382, 339, 292, 286,
271, 271, 266, 250, 240, 236, 222, 222, 214, 207, 207, 207, 199, 199, 192, 199,
199, 207, 202, 202, 173, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 108,
};
public short[] VWave1 = new short[]
{
0, 9212, 6971, 3676, 2192, 1200, 930, 726, 552, 490, 444, 412, 366, 332, 292, 286,
276, 270, 270, 260, 240, 236, 226, 222, 214, 207, 207, 207, 199, 199, 192, 191,
184, 188, 184, 130, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 108,
};
public short RiseAmt = 29;
public short FallAmt = -29;
public short RiseAmt1 = 29;
public short FallAmt1 = -29;
public int Assertiveness = 0x10000;
public short BaselineFall = 51;
public int Quickness = 7200;
public int DownRampStep = 15360;
public short StressDurTime = 50;
public short VibratoDepth1Raw = 31;
public short VibratoDepth2Raw = 16;
public short VibratoFreqRaw = 47;
public short Intonation = 100;
public static VoiceData BaselineVoice => new VoiceData();
public static VoiceData WhisperVoice => new VoiceData
{
PitchHz = 110,
StressGain = 70,
Rate = 140,
VGain = 0,
AGain = 400,
ACycle = 16,
F4Freq = 3500,
F4BW = 50,
F5Freq = 4500,
F5BW = 250,
F4pFreq = 4500,
BwGain1 = 100,
BwGain3 = 50,
NGain = 200,
VWave = new short[]
{
0, 15476, 6866, 3395, 1831, 1167, 1000, 861, 747, 680, 600, 540, 496, 472, 430, 401,
367, 354, 339, 309, 307, 290, 273, 262, 211, 189, 165, 156, 144, 137, 113, 107,
113, 107, 94, 82, 89, 77, 77, 64, 56, 0, 0, 0, 0, 0, 0, 0,
},
VWave1 = new short[]
{
0, 15476, 6866, 3395, 1831, 1167, 1000, 861, 747, 680, 600, 540, 496, 472, 430, 401,
367, 354, 339, 309, 307, 290, 273, 262, 211, 189, 165, 156, 144, 137, 113, 107,
113, 107, 94, 82, 89, 77, 77, 64, 56, 0, 0, 0, 0, 0, 0, 0,
},
};
}
} // namespace