In my demo, translateStreaming always returns the translated text to me at once regardless the te.

39 views
Skip to first unread message

Connie Leung

unread,
Jul 30, 2025, 6:51:07 AMJul 30
to Chrome Built-in AI Early Preview Program Discussions
Hi all,

const stream = translator.translateStreaming(inputText, {
signal: this.#controller.signal
});


const self = this;
const reader = stream.getReader();
reader.read()
.then(function processText({ done, value }): any {
if (done) {
return;
}

self.#chunk.set(value);
reader.read().then(processText);
})
.finally (() => {
translator.destroy();
console.log('Translator destroyed');
});

Connie Leung

unread,
Jul 30, 2025, 6:52:33 AMJul 30
to Chrome Built-in AI Early Preview Program Discussions, Connie Leung
Regardless the number of words in the input, translateStreaming always returned the entire translated text, not in chunks.

When I summarizer and writer api, the streaming version returns the texts in chunks to produce a typewriter effect.

François Beaufort

unread,
Jul 30, 2025, 8:10:05 AMJul 30
to Connie Leung, Chrome Built-in AI Early Preview Program Discussions
Hey Connie,

I can reproduce as well.
Looking at Chromium source code, it is clear that translateStreaming and translate are quite similar.
image.png

I'll ask the engineering team why this is working this way in Chromium and will circle back.
Thank you!

--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/ebfed16b-f465-438b-a304-d1a81cce2b43n%40chromium.org.

François Beaufort

unread,
Jul 30, 2025, 3:03:31 PMJul 30
to Connie Leung, Chrome Built-in AI Early Preview Program Discussions
The Chrome team just told me it was a known issue on their end.
You can track progress at https://issues.chromium.org/issues/380756385

François Beaufort

unread,
Aug 4, 2025, 3:29:41 AMAug 4
to Connie Leung, Chrome Built-in AI Early Preview Program Discussions
Out of curiosity, is it breaking any use case or slowing anything down?

Connie Leung

unread,
Aug 4, 2025, 9:57:29 AMAug 4
to Chrome Built-in AI Early Preview Program Discussions, François Beaufort, Chrome Built-in AI Early Preview Program Discussions, Connie Leung
Hi Francois,

The translation seems slow because the translated text appears after a couple of seconds later. 
With other APIs,  texts appear and gives the perception that LLM is working right away.

Connie

Reply all
Reply to author
Forward
0 new messages