#!/bin/bash # TTS synthesis test curl -v -o /tmp/test_tts.wav \ -H "Content-Type: application/json" \ -d '{"input":"Hello world, this is a test of the text to speech engine.","voice":"Vivian"}' \ http://localhost:8072/v1/audio/speech 2>&1 echo "---" if [ -f /tmp/test_tts.wav ]; then ls -la /tmp/test_tts.wav file /tmp/test_tts.wav 2>/dev/null || echo "(file cmd not found)" python3 -c " import struct with open('/tmp/test_tts.wav','rb') as f: hdr = f.read(44) if hdr[:4] == b'RIFF': sz = struct.unpack('&1 else echo "No output file created" fi