Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VoiceText

Hierarchy

  • VoiceText

Index

Constructors

Properties

_URL: "https://api.voicetext.jp/v1/tts" = ...
_apiKey: string
_voiceTextParams: VoiceTextParams = {}

Methods

  • This method is used to initialize VoiceText.

    memberof

    VoiceText

    Parameters

    Returns void

  • Sets the emotion of the speaker.

    memberof

    VoiceText

    Parameters

    • emotion: Emotion

      Specify among happiness, anger, and sadness. If not specified in the constructor, the default emotion is happiness.

    Returns VoiceText

    {this}

  • setEmotionLevel(level: 1 | 2 | 3 | 4): VoiceText
  • Sets the emotion level of the speaker.

    memberof

    VoiceText

    Parameters

    • level: 1 | 2 | 3 | 4

      Specify among 1, 2, 3, and 4. If not specified in the constructor, the default level is 2.

    Returns VoiceText

    {this}

  • Sets the audio data format.

    memberof

    VoiceText

    Parameters

    • format: Format

      Specify among wav, ogg, mp3. If not specified in the constructor, the default format is wav.

    Returns VoiceText

    {this}

  • Sets the pitch of the synthesized voice.

    memberof

    VoiceText

    Parameters

    • pitch: number

      Specify between 50 and 200. If not specified in the constructor, the default pitch is 100.

    Returns VoiceText

    {this}

  • Sets the speaker of the synthesized voice.

    memberof

    VoiceText

    Parameters

    • speaker: Speaker

      Speaker to be used. Specify among show, haruka, hikari, takeru, bear, santa. If not specified in the constructor, the default speaker is show.

    Returns VoiceText

    {this}

  • Sets the speed of the synthesized voice.

    memberof

    VoiceText

    Parameters

    • speed: number

      Specify between 50 and 400. If not specified in the constructor, the default speed is 100.

    Returns VoiceText

    {this}

  • Sets the text to be synthesized.

    memberof

    VoiceText

    Parameters

    • text: string

      Text to be synthesized.

    Returns VoiceText

    {this}

  • Sets the volume percentage of the synthesized voice.

    memberof

    VoiceText

    Parameters

    • volume: number

      Specify between 50 and 200. If not specified in the constructor, the default volume is 100.

    Returns VoiceText

    {this}

  • Return the synthesized voice as a readable stream. For example, if you are using it with a discord bot, use this instead of fetchBuffer.

    memberof

    VoiceText

    Returns Promise<<internal>.Readable>

Generated using TypeDoc