Back to Home

Silero-TTS v5: questions with intonation in Russian

Silero-TTS v5 updated for Russian language with support for four types of questions: prosodic accents in general questions via *asterisks*, SSML and automatic homographs. Code examples on pip and torch.hub demonstrate audio generation on CPU.

Questions in silero-tts v5: prosody and accents in Russian
Advertisement 728x90

Silero-TTS v5: Four Types of Russian Question Intonation Now Live

Silero-TTS v5 for Russian now generates speech with accurate question intonation. The model handles four types of questions: special (with interrogative words), general (with prosodic emphasis), alternative, and tail questions. For general questions, the intonational center is marked with asterisks — this enhances expressiveness without requiring extra parameters.

Key Features of the Update:

  • Automatic handling of homographs and stress.
  • Full SSML support for prosody control.
  • High inference speed on CPU.
  • Voices: aidar, baya, kseniya, xenia (eugene in development).

Linguistic Foundations of Question Prosody

In Russian, questions are marked grammatically (word order, rarely), lexically (interrogative words, particles), and prosodically (intonation). General questions rely solely on prosody: the intonational center can fall on any word, altering meaning.

Examples:

Google AdInline article slot
  • "Did he COME?" — emphasis on the action.
  • "HE came?" — emphasis on the subject.

Training the model requires labeling question types and accent positions. Corpus data without such annotations is insufficient.

Examples of General Question Synthesis

Code for generating questions with different accent positions:

import IPython.display as ipd

texts = [
  '*Organizers* sent us electronic tickets?',
  'Organizers *sent* us electronic tickets?',
  'Organizers sent *us* electronic tickets?',
  'Organizers sent us *electronic* tickets?',
  'Organizers sent us electronic *tickets*?'
]

for i, text in enumerate(texts):
    audio = model.apply_tts(text=text, speaker='xenia')
    ipd.display(ipd.Audio(audio, rate=48000))

Audio samples show a smooth pitch rise on the emphasized word and a drop at the end.

Google AdInline article slot

Installation and Basic Usage

Install via pip:

!pip install silero
from silero import silero_tts
model, example_text = silero_tts(language='ru', speaker='v5_4_ru')
audio = model.apply_tts(text=example_text)

Full initialization via torch.hub:

import torch

language = 'ru'
model_id = 'v5_4_ru'
device = torch.device('cpu')
model, example_text = torch.hub.load(repo_or_dir='snakers4/silero-models',
                                     model='silero_tts',
                                     language=language,
                                     speaker=model_id)
model.to(device)
sample_rate = 48000
speaker = 'xenia'
put_accent=True
put_yo=True
put_stress_homo=True
put_yo_homo=True

example_text = 'My name is Leva Korolev. I am ready. And I am ready to open locks of any complexity!'

audio = model.apply_tts(text=example_text,
                        speaker=speaker,
                        sample_rate=sample_rate,
                        put_accent=put_accent,
                        put_yo=put_yo,
                        put_stress_homo=put_stress_homo,
                        put_yo_homo=put_yo_homo)

SSML example with prosody control:

Google AdInline article slot
ssml_sample = """
              <speak>
              <p>
                  When I wake up, <prosody rate="x-slow">I speak quite slowly</prosody>.
                  Then I start speaking in my normal voice,
                  <prosody pitch="x-high">and I can speak in a higher tone</prosody>,
                  or <prosody pitch="x-low">conversely, lower</prosody>.
                  Then, if I am lucky, <prosody rate="fast">I can speak quite quickly.</prosody>
                  And I can make pauses of any length, for example, two seconds <break time="2000ms"/>
                  <p>
                    Also I can make pauses between paragraphs.
                  </p>
                  <p>
                    <s>And I can also make pauses between sentences.</s>
                    <s>Here, for example, like now.</s>
                  </p>
              </p>
              </speak>
              """

audio = model.apply_tts(ssml_text=ssml_sample,
                        speaker=speaker,
                        sample_rate=sample_rate)

Intonation Parameters and Recommendations

  • intensity=3: strength of question intonation (default, optimal).
  • For special, alternative, and tail questions, accent is optional.
  • General questions require asterisks to precisely position the accent.

Question types and their handling:

  • Special: "What? Where? When?" — lexical marking + standard prosody.
  • General: "You home?" — prosodic accent on any word.
  • Alternative: "Fish or meat?" — intonation on alternatives.
  • Tail: "No, really?" — rising tone on the tail.

What Matters

  • Silero-TTS v5 generates questions with prosodic accent on arbitrary positions without GPU.
  • Support for four question types via simple asterisk marking in general cases.
  • SSML integration for fine-tuning prosody and pauses.
  • Install via pip/torch.hub, sample_rate=48000 Hz.
  • Emphasis in declarative sentences planned for future updates.

— Editorial Team

Advertisement 728x90

Read Next