Sign2Voice / scripts /test_full_pipeline.py
lilblueyes's picture
Expose stepwise ASL debug pipeline
c6c2ad9
Raw
History Blame Contribute Delete
1.19 kB
from __future__ import annotations
import argparse
import bootstrap # noqa: F401
from signspeak.llm import generate_subtitle_and_instruction
from signspeak.pipeline import run_asl_video
from signspeak.tts import generate_tts
def main() -> None:
parser = argparse.ArgumentParser(description="Run ASL -> llama.cpp -> Qwen3-TTS.")
parser.add_argument("video", nargs="?", default=None, help="Video path. Creates a demo clip if omitted.")
parser.add_argument("--gloss-override", default=None, help="Manual glosses to use when the ASL model is missing.")
parser.add_argument("--language", default="English")
parser.add_argument("--speaker", default="Ryan")
args = parser.parse_args()
intent_json, _, summary, debug_video_path = run_asl_video(args.video, args.gloss_override)
subtitle, instruction, _ = generate_subtitle_and_instruction(intent_json)
audio_path = generate_tts(subtitle, args.language, args.speaker, instruction)
print(summary)
print(f"Debug overlay: {debug_video_path}")
print(f"Subtitle: {subtitle}")
print(f"Voice instruction: {instruction}")
print(f"Audio: {audio_path}")
if __name__ == "__main__":
main()