/// <summary> /// ピッチを変更する。読み上げ速度と声の高さが変わる /// CAUTION: AquesTalk以外の音声データに対応させてない /// </summary> /// <param name="wav">音声データ</param> /// <param name="pitch">ピッチ(100が基準値)</param> public static void ChangePitch(byte[] wav, int pitch) { var wInfo = new WaveInfo(wav); float rate = pitch / 100.0f; wInfo.BytePerSec = (uint)(wInfo.BytePerSec * rate); wInfo.SamplingRate = (uint)(wInfo.SamplingRate * rate); wInfo.SetInfoTo(wav); }
/// <summary> /// ピッチを変更する。読み上げ速度と声の高さが変わる /// CAUTION: AquesTalk以外の音声データに対応させてない /// </summary> /// <param name="wav">音声データ</param> /// <param name="pitch">ピッチ(100が基準値)</param> public static void ChangePitch(byte[] wav, int pitch) { var wInfo = new WaveInfo(wav); float rate = pitch / 100.0f; wInfo.BytePerSec = (uint)(wInfo.BytePerSec * rate); wInfo.SamplingRate = (uint)(wInfo.SamplingRate * rate); wInfo.SetInfoTo(wav); }