-
-
Notifications
You must be signed in to change notification settings - Fork 130
Narrator Function
The Narrator function in AllTalk allows for dynamic voice switching between character dialogue and narration. This guide explains how to use this feature effectively.
Messages should be formatted as follows:
- Narrator text: Enclosed in asterisks
*
- Character text: Enclosed in quotation marks
"
Example of properly formatted text:
*She walked across the room and picked up her cup of coffee* "Hey! I'm so excited to finally meet you. I've heard so many great things about you and I'm eager to pick your brain about computers."
AI systems may deviate from these formatting rules. AllTalk has been designed to handle various irregularities:
- Any line beginning or ending with an asterisk is recognized as Narrator dialogue.
- Lines enclosed in double quotes are identified as Character dialogue.
- For other text, you can choose how AllTalk handles it (as Character or Narrator dialogue).
When the Narrator function is Enabled
or Enabled (Silent)
, the TTS engine identifies three types of text:
-
Narrated Text: Text enclosed in asterisks
*Narrated text*
-
Character Text: Text enclosed in double quotes
"Character text"
- Text-Not-Inside: Any text not enclosed in asterisks or double quotes
You can control how narrated text is handled:
- Enabled: Narrated text is spoken using the narrator voice.
- Enabled (Silent): Narrated text is recognized but not spoken (useful for silent annotations or actions).
- Disabled: Narrated text is spoken using the character voice. The narrator engine is turned off, and the Text-Not-Inside setting does not apply.
Note: If Enabled
or Enabled (silent)
is set as the API default, all text will go through the narrator function unless disabled
is sent as part of the TTS generation request.
Customize how text-not-inside is handled:
- "Character": Treated as character dialogue and spoken.
- *Narrator*: Treated as narration and spoken.
- Silent: Recognized but not spoken.
Here are some examples to illustrate different settings:
- *Narrated text* will be spoken as narration.
- "Character text" will be spoken as character dialogue.
- Any other text will be spoken as character dialogue.
- *Narrated text* will be spoken using the character voice.
- "Character text" will be spoken as character dialogue.
- Any other text will be spoken as character dialogue.
- *Narrated text* will be recognized but not spoken.
- "Character text" will be spoken as character dialogue.
- Any other text will be recognized but not spoken.
- Narrator Enabled (Silent): Allows for silent annotations within your text.
- Text-Not-Inside as Silent: Enables inclusion of text that is recognized but not spoken, useful for context or instructions.
-
Full Silence: If Narrator is set to
Enabled (Silent)
and Text-Not-Inside is set toSilent
, only character text in quotes will be spoken. - Partial Silence: Configure settings to have only certain parts of the text spoken while others are silent.
graph TD
A[Input Text] --> B{Narrator Enabled?}
B -->|Yes| C{Text Type}
B -->|No| D[All text spoken as Character]
C -->|Asterisks *...* | E{Narrator Mode}
C -->|Quotes| F[Spoken as Character]
C -->|Neither| G{Text-Not-Inside Setting}
E -->|Enabled| H[Spoken as Narrator]
E -->|Enabled Silent| I[Recognized, Not Spoken]
G -->|Character| J[Spoken as Character]
G -->|Narrator| K[Spoken as Narrator]
G -->|Silent| L[Recognized, Not Spoken]
style A fill:#f9f,stroke:#333,stroke-width:2px
style B fill:#bbf,stroke:#333,stroke-width:2px
style C fill:#bbf,stroke:#333,stroke-width:2px
style D fill:#bfb,stroke:#333,stroke-width:2px
style E fill:#bbf,stroke:#333,stroke-width:2px
style F fill:#bfb,stroke:#333,stroke-width:2px
style G fill:#bbf,stroke:#333,stroke-width:2px
style H fill:#bfb,stroke:#333,stroke-width:2px
style I fill:#fbb,stroke:#333,stroke-width:2px
style J fill:#bfb,stroke:#333,stroke-width:2px
style K fill:#bfb,stroke:#333,stroke-width:2px
style L fill:#fbb,stroke:#333,stroke-width:2px
- The process starts with the Input Text.
- It first checks if the Narrator function is enabled.
- If Narrator is disabled, all text is spoken as Character.
- If Narrator is enabled, it checks the type of text:
- Text in asterisks (*...*) is processed according to the Narrator Mode.
- Text in quotes ("...") is always spoken as Character.
- Text neither in asterisks nor quotes is processed according to the Text-Not-Inside setting.
- Narrator Mode can be either Enabled (text is spoken) or Enabled Silent (text is recognized but not spoken).
- Text-Not-Inside can be set to Character (spoken as character), Narrator (spoken as narrator), or Silent (recognized but not spoken).
Green boxes indicate text that will be spoken, red boxes indicate text that is recognized but not spoken, and blue boxes represent decision points.
+ *Once upon a time in a small village, there was a young girl named Lily.*
! Lily woke up early every morning.
- "I love exploring the forest near my home."
+ * Lily said. One day, she found a mysterious key lying on the ground.*
- "This key looks old and rusty, but it seems to sparkle in the sunlight,"
! She thought. Lily decided she would keep the key safe until she could discover its purpose.
+ *Curious and excited, she decided to find out what the key opened.*
-
Narrated Text (Lines starting with
+
):- These lines are enclosed in asterisks and represent the narration.
- If Narrator is set to
Enabled (Silent)
, these lines would not be spoken.
-
Character Text (Lines starting with
-
):- These lines are enclosed in double quotes and represent the character's spoken dialogue or thoughts.
-
Text-Not-Inside (Lines starting with
!
):- These lines are not enclosed in asterisks or quotes and will be handled according to the
Text-Not-Inside
settings. - If set to
Text-not-inside
>Silent
, these lines would not be spoken.
- These lines are not enclosed in asterisks or quotes and will be handled according to the