[GH-ISSUE #5478] [Feature]: Speaker-aware avatars in Merged replies #3044

Closed
opened 2026-10-21 05:59:06 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @xKoMaRx on GitHub (Aug 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5478

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

In Roleplay group chats using Merged (Narrator) mode, a single generated response can contain narration and dialogue from several different characters.

Marinara can already identify individual speakers through <speaker="Name">... tags and use that information for features such as dialogue coloring and TTS. However, the visual avatar presentation is still handled at the whole-message level.

This makes longer multi-character scenes harder to follow visually. Even when it is clear from the text that Anna is speaking, then Marek, then Anna again, the dialogue still appears inside a single Narrator-style response rather than being visually associated with the relevant Character Card.

For example:

The corridor went silent.

<speaker="Anna">"Did you hear that?"

Marek stopped in front of the basement door.

<speaker="Marek">"Stay behind me."

<speaker="Anna">"That is exactly what people say before something terrible happens."

A heavy knock came from below.

Merged mode is very useful because the model can compose narration and interactions between several characters as one coherent scene, but it would be much easier to read if each dialogue segment could also show the avatar of the character who is actually speaking

Proposed solution

Add an optional speaker-aware avatar rendering setting for Merged Roleplay replies.

When enabled, Marinara would keep the response as a single logical Merged message and a single model generation, but visually render recognized speaker segments with the matching Character Card's avatar and name.

For example:

The corridor went silent.

[Anna avatar] Anna
"Did you hear that?"

Marek stopped in front of the basement door.

[Marek avatar] Marek
"Stay behind me."

[Anna avatar] Anna
"That is exactly what people say before something terrible happens."

A heavy knock came from below.

Suggested behavior:

  • Narration remains visually separate and keeps the normal Roleplay narrator styling.
  • Recognized speaker segments display the matching character's avatar and name.
  • The Character Card avatar is used by default.
  • If an Expression Avatar is available for that character/message, it should preferably be used.
  • Characters without an avatar can use the existing fallback/initial avatar.
  • Unknown or unresolvable speaker names should gracefully fall back to the current rendering instead of breaking the message.
  • Consecutive segments from the same speaker may remain grouped together.
  • Color Dialogues should continue to work.
  • Existing TTS speaker routing should continue to work.
  • Editing, swipes, regeneration and message actions should still operate on the complete Merged message.
  • No additional LLM requests should be required.

A setting such as:

Speaker-aware avatars in Merged replies

could be placed under Roleplay Avatars or the Merged (Narrator) group-chat settings.

This could be disabled by default to preserve the current appearance for existing users.

Alternatives considered

Use the existing Narrator avatar cycling

Merged Narrator already has avatar presentation for active characters, including cycling or displaying active avatars together.

However, this still represents the entire Merged message rather than the specific character currently speaking inside that message.

A response containing dialogue from three different characters therefore still cannot visually associate each individual dialogue segment with its speaker.

Change the Narrator avatar to the last/current speaker

This would improve the message-level avatar, but a finished Merged response may contain several different speakers.

One avatar for the whole message cannot accurately represent:

Anna → Marek → Anna → Julia

inside the same generated response.

Use Individual group-chat mode

Individual mode provides clear per-character messages and avatars, but it changes generation behavior.

The main benefit of Merged mode is that one generation can compose narration, reactions and dialogue between several characters as one coherent scene. The goal of this request is to keep that behavior while improving visual speaker attribution.

Rely only on Color Dialogues

Dialogue colors help distinguish speakers, but avatars provide much stronger visual identification, especially in scenes with several recurring characters.

Additional context

Much of the underlying functionality required for this already appears to exist in Marinara.

Merged replies already contain identifiable speaker information, and Marinara has shared speaker-segment parsing for <speaker="Name">... and Name: text formats.

There is also already a grouped message renderer elsewhere in the client that resolves individual speaker segments to Character Cards and can display the corresponding avatar, name and content.

Because of that, this seems primarily like a Roleplay presentation/rendering improvement rather than a change to generation behavior or the Character Card format.

This is also different from #4518.

#4518 addressed which active-character avatars are displayed in the Merged Narrator avatar area and whether they cycle or appear together.

This request is specifically about displaying the appropriate Character Card avatar next to each recognized speaker segment inside the Merged response itself.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @xKoMaRx on GitHub (Aug 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5478 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? In Roleplay group chats using Merged (Narrator) mode, a single generated response can contain narration and dialogue from several different characters. Marinara can already identify individual speakers through <speaker="Name">...</speaker> tags and use that information for features such as dialogue coloring and TTS. However, the visual avatar presentation is still handled at the whole-message level. This makes longer multi-character scenes harder to follow visually. Even when it is clear from the text that Anna is speaking, then Marek, then Anna again, the dialogue still appears inside a single Narrator-style response rather than being visually associated with the relevant Character Card. For example: The corridor went silent. <speaker="Anna">"Did you hear that?"</speaker> Marek stopped in front of the basement door. <speaker="Marek">"Stay behind me."</speaker> <speaker="Anna">"That is exactly what people say before something terrible happens."</speaker> A heavy knock came from below. Merged mode is very useful because the model can compose narration and interactions between several characters as one coherent scene, but it would be much easier to read if each dialogue segment could also show the avatar of the character who is actually speaking ## Proposed solution Add an optional speaker-aware avatar rendering setting for Merged Roleplay replies. When enabled, Marinara would keep the response as a single logical Merged message and a single model generation, but visually render recognized speaker segments with the matching Character Card's avatar and name. For example: The corridor went silent. [Anna avatar] Anna "Did you hear that?" Marek stopped in front of the basement door. [Marek avatar] Marek "Stay behind me." [Anna avatar] Anna "That is exactly what people say before something terrible happens." A heavy knock came from below. Suggested behavior: - Narration remains visually separate and keeps the normal Roleplay narrator styling. - Recognized speaker segments display the matching character's avatar and name. - The Character Card avatar is used by default. - If an Expression Avatar is available for that character/message, it should preferably be used. - Characters without an avatar can use the existing fallback/initial avatar. - Unknown or unresolvable speaker names should gracefully fall back to the current rendering instead of breaking the message. - Consecutive segments from the same speaker may remain grouped together. - Color Dialogues should continue to work. - Existing TTS speaker routing should continue to work. - Editing, swipes, regeneration and message actions should still operate on the complete Merged message. - No additional LLM requests should be required. A setting such as: Speaker-aware avatars in Merged replies could be placed under Roleplay Avatars or the Merged (Narrator) group-chat settings. This could be disabled by default to preserve the current appearance for existing users. ## Alternatives considered _**Use the existing Narrator avatar cycling**_ Merged Narrator already has avatar presentation for active characters, including cycling or displaying active avatars together. However, this still represents the entire Merged message rather than the specific character currently speaking inside that message. A response containing dialogue from three different characters therefore still cannot visually associate each individual dialogue segment with its speaker. _**Change the Narrator avatar to the last/current speaker**_ This would improve the message-level avatar, but a finished Merged response may contain several different speakers. One avatar for the whole message cannot accurately represent: Anna → Marek → Anna → Julia inside the same generated response. _**Use Individual group-chat mode**_ Individual mode provides clear per-character messages and avatars, but it changes generation behavior. The main benefit of Merged mode is that one generation can compose narration, reactions and dialogue between several characters as one coherent scene. The goal of this request is to keep that behavior while improving visual speaker attribution. _**Rely only on Color Dialogues**_ Dialogue colors help distinguish speakers, but avatars provide much stronger visual identification, especially in scenes with several recurring characters. ## Additional context Much of the underlying functionality required for this already appears to exist in Marinara. Merged replies already contain identifiable speaker information, and Marinara has shared speaker-segment parsing for <speaker="Name">...</speaker> and Name: text formats. There is also already a grouped message renderer elsewhere in the client that resolves individual speaker segments to Character Cards and can display the corresponding avatar, name and content. Because of that, this seems primarily like a Roleplay presentation/rendering improvement rather than a change to generation behavior or the Character Card format. This is also different from #4518. #4518 addressed which active-character avatars are displayed in the Merged Narrator avatar area and whether they cycle or appear together. This request is specifically about displaying the appropriate Character Card avatar next to each recognized speaker segment inside the Merged response itself. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:59:06 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 24, 2026):

I don't see much purpose for this, the merged option already colors dialogues correctly depending on who speaks. The purpose of this mode is so that the responses from everyone are handled by one message. We only show one avatar per message box, so this change would require us to changing the entire display of message boxes.

<!-- gh-comment-id:5398187884 --> @SpicyMarinara commented on GitHub (Aug 24, 2026): I don't see much purpose for this, the merged option already colors dialogues correctly depending on who speaks. The purpose of this mode is so that the responses from everyone are handled by one message. We only show one avatar per message box, so this change would require us to changing the entire display of message boxes.
Author
Owner

@xKoMaRx commented on GitHub (Aug 24, 2026):

I want it to stay that way ( One avatar for dialog box ). The avatar belongs to the Narrator, not to the individual/multiple characters in the RP.

The only thing I mean here is adding the avatar ( picture ) of the character who is currently speaking inside the Narrator's response itself, alongside the existing per-character dialogue coloring. In short image injection into response with picture from character card when this person is spiking.

I think this would be much easier to read than relying on colors alone, since you wouldn't have to remember or figure out which color belongs to which character. This will matter even more once Character Cards can be added or created by a Custom Agent during an ongoing RP.

<!-- gh-comment-id:5398387170 --> @xKoMaRx commented on GitHub (Aug 24, 2026): I want it to stay that way ( One avatar for dialog box ). The avatar belongs to the Narrator, not to the individual/multiple characters in the RP. The only thing I mean here is adding the avatar ( picture ) of the character who is currently speaking inside the Narrator's response itself, alongside the existing per-character dialogue coloring. In short image injection into response with picture from character card when this person is spiking. I think this would be much easier to read than relying on colors alone, since you wouldn't have to remember or figure out which color belongs to which character. This will matter even more once Character Cards can be added or created by a Custom Agent during an ongoing RP.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3044
No description provided.