tts-voiceover

Pembuatan sulih suara teks-ke-ucapan dari catatan pembicara YAML menggunakan Azure Speech SDK dengan kontrol pengucapan SSML

npx skills add https://github.com/microsoft/hve-core --skill tts-voiceover

TTS Voice Over Skill

Generates per-slide WAV voice-over files from YAML speaker_notes using Azure Speech SDK with SSML pronunciation control.

Overview

This skill reads content.yaml files from a PowerPoint skill content directory, extracts speaker_notes fields, applies SSML acronym aliases for correct pronunciation of technical terms, and produces one WAV file per slide. Supports dry-run mode for SSML template verification without Azure credentials.

Prerequisites

  • Azure Speech resource — Free tier provides 500K characters per month.
  • Authentication — Key-based (SPEECH_KEY) or Microsoft Entra ID (SPEECH_RESOURCE_ID).
  • Python 3.11+ with uv for virtual environment management.
  • Data handling note — Speaker-notes content is transmitted to the configured SPEECH_REGION for synthesis. Operators must pin an approved region and avoid sending regulated or confidential narration.

Key-Based Auth

export SPEECH_KEY="your-speech-key"
export SPEECH_REGION="eastus"

Microsoft Entra ID Auth

Requires a custom domain on the Speech resource and Cognitive Services Speech User role.

export SPEECH_RESOURCE_ID="/subscriptions/.../Microsoft.CognitiveServices/accounts/your-resource"
export SPEECH_REGION="eastus"

Install dependencies:

# run from this skill folder
uv sync

Quick Start

Verify SSML templates without generating audio:

uv run scripts/generate_voiceover.py --dry-run --content-dir path/to/content

Generate voice-over WAV files:

uv run scripts/generate_voiceover.py --content-dir path/to/content --output-dir voice-over

Embed audio into a PPTX deck:

uv run scripts/embed_audio.py --input deck.pptx --audio-dir voice-over --output deck-narrated.pptx

Parameters Reference

generate_voiceover.py

ParameterTypeDefaultDescription
--dry-runflagfalsePrint SSML templates without generating audio
--voicestringen-US-Andrew:DragonHDLatestNeuralAzure TTS voice name
--ratestring+10%Speech prosody rate
--content-dirpathcontentPath to slide content directory
--output-dirpathvoice-overPath to WAV output directory
--lexiconpath(auto-detect)Custom acronyms.yaml path
--collapse-newlinesflagfalseCollapse newlines and whitespace runs in speaker notes into single spaces before synthesis
--verbose / -vflagfalseEnable verbose (DEBUG) logging output

embed_audio.py

Embeds WAV files into corresponding PPTX slides and adds narration timing XML so PowerPoint recognizes the audio for video export via File > Export > Create a Video > Use Recorded Timings and Narrations.

ParameterTypeDefaultDescription
--inputpath(required)Source PPTX file path
--audio-dirpathvoice-overDirectory with slide-NNN.wav
--outputpath*-narrated.pptxOutput PPTX file path
--verbose / -vflagfalseEnable verbose (DEBUG) logging output

Script Reference

Generate with custom voice and rate:

uv run scripts/generate_voiceover.py \
  --content-dir content \
  --output-dir voice-over \
  --voice "en-US-Jenny:DragonHDLatestNeural" \
  --rate "+5%"

Use a custom lexicon:

uv run scripts/generate_voiceover.py \
  --content-dir content \
  --lexicon custom-acronyms.yaml

Collapse newlines in speaker notes (recommended for block-scalar | notes, whose line breaks are otherwise spoken as pauses):

uv run scripts/generate_voiceover.py \
  --content-dir content \
  --collapse-newlines

Embed generated audio:

uv run scripts/embed_audio.py \
  --input slide-deck/presentation.pptx \
  --audio-dir voice-over \
  --output slide-deck/presentation-narrated.pptx

Acronym Lexicon

The lexicon controls SSML <sub alias> replacements for acronyms and technical terms. Create an acronyms.yaml file:

acronyms:
  HVE-Core: "H V E Core"
  OWASP: "Oh wasp"
  SBOM: "S Bomb"
  SLSA: "Salsa"
  CI/CD: "C I C D"

Lexicon resolution order:

  1. Path specified via --lexicon argument.
  2. acronyms.yaml in the content directory.
  3. Built-in defaults covering common technical acronyms.

SSML Template

Each slide produces an SSML document:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
 xmlns:mstts="http://www.w3.org/2001/mstts" xml:lang="en-US">
  <voice name="en-US-Andrew:DragonHDLatestNeural">
    <prosody rate="+10%">
      Text with <sub alias="Oh wasp">OWASP</sub> aliases applied.
    </prosody>
  </voice>
</speak>

Integration with PowerPoint Skill

This skill reads from the PowerPoint skill's content directory structure:

content/
├── slide-001/
│   └── content.yaml    # Must include speaker_notes: field
├── slide-002/
│   └── content.yaml
└── ...

Each content.yaml should contain a speaker_notes: field with the narration text. The generated WAV files are named slide-NNN.wav matching the directory names.

Troubleshooting

IssueSolution
Set SPEECH_KEY ... or SPEECH_RESOURCE_IDExport SPEECH_KEY (key auth) or SPEECH_RESOURCE_ID (Entra ID) with SPEECH_REGION.
401 with Entra ID authVerify custom domain on the Speech resource and Cognitive Services Speech User role. RBAC propagation takes up to 5 minutes.
Empty WAV files or skipped slidesVerify speaker_notes: is present and non-empty in content.yaml.
Mispronounced acronymsAdd entries to acronyms.yaml with phonetic aliases.
azure-cognitiveservices-speech package is requiredRun uv sync in the skill directory.
Audio icon visible in PPTXReposition or resize the audio object in PowerPoint after embedding.
Authored slide animations missing after embeddingembed_audio.py replaces existing p:timing with narration timing; re-apply animations in PowerPoint after embedding audio.
Slides no longer advance on click after embeddingembed_audio.py sets advClick="0" for auto-advance. To re-enable, select all slides in PowerPoint and check Advance Slide > On Mouse Click in the Transitions tab.
Video export shows "No timings recorded"Re-embed audio with the updated embed_audio.py which adds narration timing XML automatically.

Lebih banyak skill dari microsoft

oss-growth
microsoft
Persona peretas pertumbuhan OSS
agent-framework-azure-ai-py
microsoft
Bangun agen Azure AI Foundry menggunakan Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Gunakan saat membuat agen persisten dengan AzureAIAgentsProvider, menggunakan alat yang dihosting (code interpreter, file search, web search), mengintegrasikan server MCP, mengelola utas percakapan, atau mengimplementasikan respons streaming. Mencakup alat fungsi, keluaran terstruktur, dan agen multi-alat.
development
airunway-aks-setup
microsoft
Siapkan AI Runway di AKS — dari klaster kosong hingga model berjalan. Mencakup verifikasi klaster, instalasi controller, penilaian GPU, penyiapan penyedia, dan deployment pertama. KAPAN: "setup AI Runway", "onboard AKS cluster", "install AI Runway", "airunway setup", "deploy model to AKS", "GPU inference on AKS", "KAITO setup on AKS", "run LLM on AKS", "vLLM on AKS", "set up model serving on AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Panduan untuk instrumentasi aplikasi web dengan Azure Application Insights. Menyediakan pola telemetri, pengaturan SDK, dan referensi konfigurasi. KAPAN: cara menginstrumentasi aplikasi, SDK App Insights, pola telemetri, apa itu App Insights, panduan Application Insights, contoh instrumentasi, praktik terbaik APM.
devops
applicationinsights-web-ts
microsoft
Instrumentasi aplikasi browser/web dengan Application Insights JavaScript SDK (@microsoft/applicationinsights-web). Digunakan untuk Real User Monitoring (RUM) — tampilan halaman, klik, dependensi AJAX/fetch, pengecualian, peristiwa kustom, dan jejak agen GenAI sisi browser yang dikorelasikan dengan jejak OpenTelemetry backend. Mencakup pengaturan SDK Loader Script dan npm, ekstensi kerangka kerja (React, React Native, Angular), Click Analytics, inisialisasi telemetri, dan konvensi semantik OTel GenAI untuk span agen/alat/model yang dipancarkan dari browser.
devops
azure-ai-anomalydetector-java
microsoft
Bangun aplikasi deteksi anomali dengan Azure AI Anomaly Detector SDK untuk Java. Gunakan saat mengimplementasikan deteksi anomali univariat/multivariat, analisis deret waktu, atau pemantauan bertenaga AI.
development
azure-ai-language-conversations-py
microsoft
Implementasikan Pemahaman Bahasa Percakapan (CLU) menggunakan SDK Python azure-ai-language-conversations. Gunakan saat bekerja dengan ConversationAnalysisClient untuk menganalisis maksud dan entitas percakapan, membangun fitur NLP, atau mengintegrasikan pemahaman bahasa ke dalam aplikasi.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 untuk Python. Gunakan untuk ruang kerja ML, pekerjaan, model, kumpulan data, komputasi, dan pipeline. Pemicu: "azure-ai-ml", "MLClient", "ruang kerja", "registri model", "pekerjaan pelatihan", "kumpulan data".
development