Recent

Author Topic: SAPI  (Read 993 times)

Rontic

  • Newbie
  • Posts: 1
SAPI
« on: September 29, 2021, 11:03:35 am »
I can get my programs to talk under Windows 10 using SAPI, but haven't yet found out how to enumerate the voices, change the voice that I want to use, as well as the pitch, speed and volume.
Can someone please help me with my problem?
I can do it with Delphi under Windows XP.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8388
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: SAPI
« Reply #1 on: September 29, 2021, 11:53:33 am »
I can do it with Delphi under Windows XP.
Should be the same under FPC, as long as you don't use any 3rd party components but only pure Windows API.

Red_prig

  • New Member
  • *
  • Posts: 18
Re: SAPI
« Reply #2 on: September 29, 2021, 12:00:22 pm »
I used sapi in my project, see here:
1) modified SpeechLib_TLB.pas -> https://github.com/red-prig/twitch_vip_bot/blob/trunk/SpeechLib_TLB.pas
2) see proc:
Code: Pascal  [Select][+][-]
  1. Procedure EnumSAPIVoices(cb:TEnumSAPIVoiceCb);
  2. Procedure EnumSAPIAudioOutputs(cb:TEnumSAPIVoiceCb);
  3.  
in
 https://github.com/red-prig/twitch_vip_bot/blob/trunk/AudioEngine.pas

 

TinyPortal © 2005-2018