Documentation
¶
Overview ¶
Package sapi has its documentation on: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ee125640(v=vs.85)
Index ¶
- Constants
- type Sapi
- func (s *Sapi) GetPriority() (int, error)
- func (s *Sapi) GetRate() (int, error)
- func (s *Sapi) GetVolume() (int, error)
- func (s *Sapi) Pause() error
- func (s *Sapi) Resume() error
- func (s *Sapi) SetPriority(priority int) error
- func (s *Sapi) SetRate(rate int) error
- func (s *Sapi) SetVolume(volume int) error
- func (s *Sapi) Skip(num_items int) (int, error)
- func (s *Sapi) Speak(message string, flags int) (int, error)
- func (s *Sapi) WaitUntilDone(ms_timeout int) (bool, error)
Constants ¶
View Source
const ( SVSFDefault = 0 SVSFlagsAsync = 1 SVSFPurgeBeforeSpeak = 2 SVSFIsFilename = 4 SVSFIsXML = 8 SVSFIsNotXML = 16 SVSFPersistXML = 32 // Normalizer Flags SVSFNLPSpeakPunc = 64 // Masks SVSFNLPMask = 64 SVSFVoiceMask = 127 SVSFUnusedFlags = -128 )
View Source
const ( SVPNormal = 0 SVPAlert = 1 SVPOver = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sapi ¶
type Sapi struct {
// contains filtered or unexported fields
}
Sapi is a structure that wraps the SAPI COM object
func NewSapi ¶
NewSapi creates the SAPI TTS object. Call ole.CoInitialize() or ole.CoInitializeEx() before calling this function.
func (*Sapi) GetPriority ¶
GetPriority gets the priority level of the voice.
func (*Sapi) Pause ¶
Pause pauses the voice at the nearest alert boundary and closes the output device, allowing it to be used by other voices.
func (*Sapi) SetPriority ¶
SetPriority sets the priority level of the voice.
func (*Sapi) Skip ¶
Skip skips the voice forward or backward by the specified number of "Sentence" items within the current input text stream.
Click to show internal directories.
Click to hide internal directories.