Skip to content

[MWPW-193434] Doodlebug Wave 2.2 Audio - Adding support for Text to Speech verbs#767

Merged
vipu0303 merged 48 commits intostagefrom
pb-audio1
May 7, 2026
Merged

[MWPW-193434] Doodlebug Wave 2.2 Audio - Adding support for Text to Speech verbs#767
vipu0303 merged 48 commits intostagefrom
pb-audio1

Conversation

@vipu0303
Copy link
Copy Markdown
Collaborator

@vipu0303 vipu0303 commented May 5, 2026

Arushi Gupta and others added 30 commits April 21, 2026 17:35
Testing Notes: 
1. Regress all the upload workflow acros products
2. Test the limits for each product

Resolves: [MWPW-NUMBER](https://jira.corp.adobe.com/browse/MWPW-NUMBER)

**Test URLs:**
- Before:
https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/upscale-video?unitylibs=stage
- After:
https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/upscale-video?unitylibs=upscaleVid

---------

Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
const ringBg = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
ringBg.setAttribute('class', 'unity-paf-ring-bg');
ringBg.setAttribute('cx', '24');
ringBg.setAttribute('cy', '24');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the svg attributes can be part of svg tag in sprite.svg. Please check. If that works it will reduce all of these lines.

Comment thread unitylibs/core/workflow/workflow.js Outdated

createInteractiveArea(block, selector, targetCfg) {
if (this.widgetName === 'prompt-bar-style') return this.el;
if (this.widgetName === 'prompt-bar-style' || this.widgetName === 'prompt-bar-audio') return this.el;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here...we need a more scalable way to check this instead of extending the conditional.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

}

function resolveCurrentPageSourceUrl(root) {
const icon = root.querySelector(`[class*="${CURRENT_PAGE_ICON_PREFIX}"]`);
Copy link
Copy Markdown
Collaborator

@arugupta1992 arugupta1992 May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetch this from verbDropdown() function

Copy link
Copy Markdown
Collaborator Author

@vipu0303 vipu0303 May 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we are also extracting icon-operation-<> in action-binder but this is a very small parsing and if we extract it out somewhere (utils.js) and reuse at both places will unnecessarily bloat utils.js.
@arugupta1992

const RING_C = 2 * Math.PI * RING_R;
const RING_STROKE_WIDTH = (2.78751 * 48) / 33;
const RING_STROKE_ATTR = String(RING_STROKE_WIDTH);
const PAF_PP_PLAY_SVG = '<svg class="unity-paf-pp-svg" width="20" height="20" aria-hidden="true"><use xlink:href="#unity-play-filled-icon"></use></svg>';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these to sprite.svg.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAF_PP_PLAY_SVG, PAF_PP_PAUSE_SVG are defined in sprites.svg only. we needed to use it at multiple places in the code, so just extracted them out here to make the code more readable.
PAF_PROGRESS_SVG and PAF_PLAYER_LOADING_SVG need to be defined here only as they are interactive based on the progress of the audio file played.
We can discuss if you have any concerns further.

container.querySelectorAll('a[href]').forEach((a) => {
const href = a.getAttribute('href')?.trim() || '';
if (!href) return;
if (/^javascript:/i.test(href)) return;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this regex do?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it basically skips execeuting this if this url is a javascript code. But since this is internally authored we can remove this check.

Comment thread unitylibs/core/widgets/prompt-bar-audio/prompt-bar-audio.js Outdated
return base.toLowerCase();
}

const CURRENT_PAGE_ICON_PREFIX = 'icon-operation-';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be used directly to save lines as in other flows?

let promptWithStyleEvents = null;

function sanitizeCurrentPageFileBase(name) {
if (!name || !name.trim()) return null;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

const VOICE_ROW_PEEK_SCROLLED_CLASS = 'unity-paf-voice-row-peek-scrolled';
const EMPTY_PROMPT_RESTORE_MS = 10000;

function filterVoicesByModelId(voices, selectedModelId) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider creating a map when the values are read for the first time and then do a lookup from the map

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. Implemented.

});
}

function currentPageConfigItemToVoice(item) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function currentPageConfigItemToVoice(item) {
function createVoiceObject(item) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made this inline

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yet to merge my changes, Wait..

Copy link
Copy Markdown
Collaborator

@arugupta1992 arugupta1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditionally approving this to merge it to stage to enable testing. PR comments can be taken in follow up PR.

});
}

function currentPageConfigItemToVoice(item) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

@asonnalagi
Copy link
Copy Markdown
Collaborator

@vipu0303 vipu0303 merged commit 739a5f5 into stage May 7, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants