INNER CODE UNIT · JavaScript

buildVoicePicker

mario-andreschak/FLUJO · githubpages/short/app.js:205

  function buildVoicePicker() {
    voiceSelect.replaceChildren();
    Object.entries(VOICE_VARIANTS).forEach(([key, voice]) => {
      const option = document.createElement("option");
      option.value = key;
      const language = STUDIO_CONTENT.languages?.[voice.language]?.name;
      option.textContent = language ? `${voice.name} · ${language}` : voice.name;
      voiceSelect.appendChild(option);
    });
    voiceSelect.value = selectedVoice;
    const selected = VOICE_VARIANTS[selectedVoice];
    voiceStatus.textContent = `${selected.name} selected`;
    $(".voice-picker").title = `Narrator: ${selected.name}`;
    if (voiceover.getAttribute("src") !== selected.source) {
      voiceover.src = selected.source;
      voiceover.load();
    }
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…