| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Public Member Functions | Public Attributes | List of all members
PDFTextToSpeechSynthesis Interface Reference
PDFViewCtrl » readAloud

The interface of the speech synthesizer. You need to implement all the methods and properties declared below when customizing the speech synthesizer. More...

Inheritance diagram for PDFTextToSpeechSynthesis:

## Public Member Functions
void | pause ()
| Method used to pause a voice synthesizer that is playing. More...
Promise< void > | play (utterances:IterableIterator< Promise< PDFTextToSpeechUtterance >>, options?:ReadAloudOptions)
| Method for synthesizing speech and playing it back based on the provided options and text content. More...
void | resume ()
| Method used to resume a voice synthesizer that has been paused. More...
void | stop ()
| Method used to stop a voice synthesizer that is playing or has been paused. More...
void | updateOptions (options:Partial< ReadAloudOptions >)
| Method for updating voice options during playback. More...

## Public Attributes
PDFTextToSpeechSynthesisStatus | status
| Property that indicates the current player status, which includes playing, paused, and stopped. More...

## Detailed Description

The interface of the speech synthesizer. You need to implement all the methods and properties declared below when customizing the speech synthesizer.

See also
  ReadAloudService.setSpeechSynthesis

Since
  8.0.0

## Member Function Documentation

## ◆ pause()

void PDFTextToSpeechSynthesis::pause | ( |  | ) |

Method used to pause a voice synthesizer that is playing.

Since
  8.0.0

## ◆ play()

Promise<void> PDFTextToSpeechSynthesis::play | ( | utterances:IterableIterator< Promise< PDFTextToSpeechUtterance >> | ,
|  | options?:ReadAloudOptions |
| ) |  |

Method for synthesizing speech and playing it back based on the provided options and text content.

Parameters

  utterances | IterableIterator<Promise<PDFTextToSpeechUtterance>> - text contents
  options | ReadAloudOptions | undefined - default speech options for current player.

Since
  8.0.0

## ◆ resume()

void PDFTextToSpeechSynthesis::resume | ( |  | ) |

Method used to resume a voice synthesizer that has been paused.

Since
  8.0.0

## ◆ stop()

void PDFTextToSpeechSynthesis::stop | ( |  | ) |

Method used to stop a voice synthesizer that is playing or has been paused.

Since
  8.0.0

## ◆ updateOptions()

void PDFTextToSpeechSynthesis::updateOptions | ( | options:Partial< ReadAloudOptions > |  | ) |

Method for updating voice options during playback.

Parameters

  options | Partial<ReadAloudOptions> - speech options

Since
  8.0.0

## Member Data Documentation

## ◆ status

PDFTextToSpeechSynthesisStatus PDFTextToSpeechSynthesis::status

Property that indicates the current player status, which includes playing, paused, and stopped.

Since
  8.0.0

@2025 Foxit Software Incorporated. All rights reserved.