Skip to content

Instantly share code, notes, and snippets.

@libklein
libklein / label-fallout-4-voice-samples.py
Last active September 21, 2025 12:40
Script to generate piper training data from fallout 4 character dialogs
import typer
from typing import Annotated
import json
from pathlib import Path, PureWindowsPath
from dataclasses import dataclass
import shutil
from rich.progress import track
app = typer.Typer()
@libklein
libklein / gist:dba40b857594fc3ba136f23a88b4f931
Created September 21, 2025 20:14
Synthesize audio from text using piper-tts from a onnx model
import argparse
import wave
from pathlib import Path
from piper.voice import PiperVoice
def synthesize_speech(
model_path: Path, model_json_path: Path, text: str, output_path: Path
):
# Load the voice model