public void SetSpeechModifier(SpeechModifier speechModifier)
 {
     this.speechModifier = speechModifier;
     speechTypeEstimatorPropertyPanel.SetObject(this.speechModifier.SpeechTypeEstimator);
     pitchPeriodEstimatorPropertyPanel.SetObject(this.speechModifier.PitchPeriodEstimator);
     pitchMarkEstimatorPropertyPanel.SetObject(this.speechModifier.PitchMarkEstimator);
 }
Example #2
0
 public void PlayAmbientSpeech(string voiceName, string speechName, SpeechModifier modifier = SpeechModifier.Standard)
 {
     if ((int)modifier >= 0 && (int)modifier < _speechModifierNames.Length)
     {
         Function.Call(Hash._PLAY_AMBIENT_SPEECH_WITH_VOICE, Handle, speechName, voiceName, _speechModifierNames[(int)modifier], 0);
     }
     else
     {
         new ArgumentOutOfRangeException("modifier");
     }
 }
Example #3
0
 public void PlayAmbientSpeech(string voiceName, string speechName, SpeechModifier modifier = SpeechModifier.Standard)
 {
     if ((int)modifier >= 0 && (int)modifier < _speechModifierNames.Length)
     {
         API.PlayAmbientSpeechWithVoice(Handle, speechName, voiceName, _speechModifierNames[(int)modifier], false);
     }
     else
     {
         new ArgumentOutOfRangeException("modifier");
     }
 }
 private void Initialize()
 {
     speechSynthesizer = new SpeechSynthesizer();
     voiceList         = speechSynthesizer.GetInstalledVoices().ToList();
     foreach (InstalledVoice voice in voiceList)
     {
         voiceSelectionComboBox.Items.Add(voice.VoiceInfo.Name);
     }
     voiceSelectionComboBox.SelectedIndex = 0;
     adjustDurationComboBox.SelectedIndex = 0;
     speechModifier = new SpeechModifier();
 }
 public static void PlayAmbientSpeech(this Ped ped, string speechName, SpeechModifier modifier = SpeechModifier.Standard)
 {
     if (modifier < SpeechModifier.Standard || modifier >= (SpeechModifier)PedExtended.SpeechModifierNames.Length)
     {
         throw new ArgumentOutOfRangeException(nameof(modifier));
     }
     Function.Call((Hash) - 8213159594590722974L, new InputArgument[3]
     {
         InputArgument.op_Implicit(((Entity)ped).get_Handle()),
         InputArgument.op_Implicit(speechName),
         InputArgument.op_Implicit(PedExtended.SpeechModifierNames[(int)modifier])
     });
 }
Example #6
0
 public static void PlayAmbientSpeech(this Ped ped, string speechName, SpeechModifier modifier = SpeechModifier.Standard)
 {
     if (modifier < SpeechModifier.Standard || (int)modifier >= SpeechModifierNames.Length)
     {
         throw new ArgumentOutOfRangeException("modifier");
     }
     Function.Call(GTA.Native.Hash._PLAY_AMBIENT_SPEECH1, (InputArgument[])new InputArgument[3]
     {
         ped.Handle,
         speechName,
         SpeechModifierNames[(int)modifier]
     });
 }