mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
Change requested by Matthieu
This commit is contained in:
@@ -31,7 +31,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
|||||||
const text = textQueue[0];
|
const text = textQueue[0];
|
||||||
setTranscriptText(text);
|
setTranscriptText(text);
|
||||||
|
|
||||||
const WPM_READING = 200; // words per minute to read
|
const WPM_READING = 200 + (textQueue.length * 10); // words per minute to read
|
||||||
const wordCount = text.split(/\s+/).length;
|
const wordCount = text.split(/\s+/).length;
|
||||||
const delay = (wordCount / WPM_READING) * 60 * 1000;
|
const delay = (wordCount / WPM_READING) * 60 * 1000;
|
||||||
console.log(`displaying "${text}" for ${delay}ms`);
|
console.log(`displaying "${text}" for ${delay}ms`);
|
||||||
|
|||||||
Reference in New Issue
Block a user