Declared in STMediaParams_doc.h

Overview

This struct describes the parameters for audio playback.

A STAudioPlayParams object can be created as follows:

let stAudioPlayParams = STAudioPlayParams()

Tasks

  •   loop

    Specifies whether the audio segmant playback will loop indefinitley until client sends a request to stop audio playback. Only valid for audio playback of recorded audio files. Does not apply to audio playback of speech synthesis. Default: false.

      property
  •   loopCount

    The number of loops of the audio playback. Default: 1.0.

      property
  •   volume

    The volume of the audio playback. Default: 1.0.

      property
  •   rate

    The rate of the audio playback. Default: 1.0.

      property
  •   pitch

    The pitch of the audio playback. Default: 0.0.

      property
  •   fadeOutMs

    The is the duration that it will take for an audio playback to stop with fade out. Default: 0 to stop audio playback immediately.

      property
  •   startPlayPosMs

    The timestamp when audio playback will start playing an audio segment from. Default: 0 to start audio playback from beginning of the audio segment.

      property
  •   stopPlayPosMs

    The timestamp when audio playback will stop playing an audio segment at. Default: 0 to continue audio playback to the end of the audio segment.

      property
  •   notificationMs

    The bookmark timestamp in milliseconds when client will be notified when audio playback reaches the bookmark in an audio segment. Default: 0 reflects no bookmark is set.

      property
  •   startPlayTextFilePos

    Character position to start speech synthesis at. The default value is 0.

      property
  •   ssVoiceParams

    The speech synthesizer voice parameres defined in STSSVoiceParams. Default value: nil.

      property
  •   ssEngine

    The speech synthesizer engine name. Default: Apple.

      property
  •   ssPlaySilenceParams

    The parameters for playing synthesized speech including the processing playing silence durations between phrases and paragraphs . Default: nil.

      property
  •   ssRecordParams

    The parameters for recording synthesized audio to a file. Default: nil.

      property

Properties

fadeOutMs

var fadeOutMs: Int32?

Discussion

The is the duration that it will take for an audio playback to stop with fade out. Default: 0 to stop audio playback immediately.

Declared In

STMediaParams_doc.h

loop

var loop: Bool?

Discussion

Specifies whether the audio segmant playback will loop indefinitley until client sends a request to stop audio playback. Only valid for audio playback of recorded audio files. Does not apply to audio playback of speech synthesis. Default: false.

Declared In

STMediaParams_doc.h

loopCount

var loopCount: Int?

Discussion

The number of loops of the audio playback. Default: 1.0.

Declared In

STMediaParams_doc.h

notificationMs

var notificationMs: Int32?

Discussion

The bookmark timestamp in milliseconds when client will be notified when audio playback reaches the bookmark in an audio segment. Default: 0 reflects no bookmark is set.

Declared In

STMediaParams_doc.h

pitch

var pitch: Float?

Discussion

The pitch of the audio playback. Default: 0.0.

Declared In

STMediaParams_doc.h

rate

var rate: Float?

Discussion

The rate of the audio playback. Default: 1.0.

Declared In

STMediaParams_doc.h

ssEngine

var ssEngine: String?

Discussion

The speech synthesizer engine name. Default: Apple.

Declared In

STMediaParams_doc.h

ssPlaySilenceParams

var ssPlaySilenceParams: STSSPlaySilenceParams?

Discussion

The parameters for playing synthesized speech including the processing playing silence durations between phrases and paragraphs . Default: nil.

Declared In

STMediaParams_doc.h

ssRecordParams

var ssRecordParams: STSSRecordParams?

Discussion

The parameters for recording synthesized audio to a file. Default: nil.

Declared In

STMediaParams_doc.h

ssVoiceParams

var ssVoiceParams: STSSVoiceParams?

Discussion

The speech synthesizer voice parameres defined in STSSVoiceParams. Default value: nil.

Declared In

STMediaParams_doc.h

startPlayPosMs

var startPlayPosMs: Int32?

Discussion

The timestamp when audio playback will start playing an audio segment from. Default: 0 to start audio playback from beginning of the audio segment.

Declared In

STMediaParams_doc.h

startPlayTextFilePos

var startPlayTextFilePos: Int64?

Discussion

Character position to start speech synthesis at. The default value is 0.

Declared In

STMediaParams_doc.h

stopPlayPosMs

var stopPlayPosMs: Int32?

Discussion

The timestamp when audio playback will stop playing an audio segment at. Default: 0 to continue audio playback to the end of the audio segment.

Declared In

STMediaParams_doc.h

volume

var volume: Float?

Discussion

The volume of the audio playback. Default: 1.0.

Declared In

STMediaParams_doc.h