diff --git a/assets/audio/voice/test_gronk.mp3 b/assets/audio/voice/test_gronk.mp3 new file mode 100644 index 000000000..0698f84bc Binary files /dev/null and b/assets/audio/voice/test_gronk.mp3 differ diff --git a/novafarma.tiled-session b/novafarma.tiled-session index 0a393d103..5e40fd061 100644 --- a/novafarma.tiled-session +++ b/novafarma.tiled-session @@ -1,5 +1,5 @@ { - "activeFile": "assets/maps ๐ŸŸฃ/MINIMAL_TEMPLATE.tmx", + "activeFile": "", "expandedProjectPaths": [ "assets/maps" ], @@ -27,8 +27,8 @@ "scale": 0.25, "selectedLayer": 2, "viewCenter": { - "x": 268, - "y": 516 + "x": 236, + "y": 484 } }, "assets/maps ๐ŸŸฃ/base_level1_tent_1767411185506.tsx": { @@ -250,7 +250,6 @@ }, "last.externalTilesetPath": "/Users/davidkotnik/repos/novafarma/assets/maps", "openFiles": [ - "assets/maps ๐ŸŸฃ/MINIMAL_TEMPLATE.tmx" ], "project": "novafarma.tiled-project", "recentFiles": [ diff --git a/tools/test_voice_gronk.py b/tools/test_voice_gronk.py new file mode 100755 index 000000000..053ef2cd8 --- /dev/null +++ b/tools/test_voice_gronk.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +""" +test_voice_gronk.py + +TEST: Generate Gronk's welcome message +Tests Edge-TTS integration for Hipodevil666 Studiosโ„ข + +Created: Jan 10, 2026 +Author: David "HIPO" Kotnik +""" + +import asyncio +import sys +from pathlib import Path + +try: + import edge_tts +except ImportError: + print("โŒ Error: edge-tts not installed!") + print("Install it with: pip install edge-tts") + sys.exit(1) + +# Gronk's test phrase (in Slovenian!) +TEST_PHRASE = "Ej stari, dobrodoลกel v Hipodevil666 Studios. V mojem vapi je zmanjkalo olja, zombiji so spet vse pokadili!" + +# Gronk voice profile (Deep, Gritty Male) +VOICE = 'en-GB-RyanNeural' # Deep British male +RATE = '-15%' # Slower (gritty, laid back) +PITCH = '-8Hz' # Deeper +VOLUME = '+0%' + +# Output +OUTPUT_DIR = Path('assets/audio/voice') +OUTPUT_FILE = OUTPUT_DIR / 'test_gronk.ogg' + +async def generate_gronk_test(): + """Generate Gronk's test voice""" + + print("๐ŸŽ™๏ธ Hipodevil666 Studiosโ„ข - Voice Test") + print("=" * 60) + print(f"Character: GRONK (Deep Troll)") + print(f"Voice: {VOICE}") + print(f"Phrase: \"{TEST_PHRASE}\"") + print() + + # Create output directory + OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + + print(f"๐Ÿ”„ Generating voice...") + + try: + # Create TTS communicator + communicate = edge_tts.Communicate( + TEST_PHRASE, + VOICE, + rate=RATE, + pitch=PITCH, + volume=VOLUME + ) + + # Save as MP3 first + mp3_path = OUTPUT_FILE.with_suffix('.mp3') + await communicate.save(str(mp3_path)) + + print(f" โœ… MP3 generated: {mp3_path.name}") + + # Convert to OGG (if ffmpeg available) + import subprocess + try: + print(f"๐Ÿ”„ Converting to OGG...") + subprocess.run([ + 'ffmpeg', '-i', str(mp3_path), + '-c:a', 'libvorbis', '-q:a', '5', + '-y', str(OUTPUT_FILE) + ], check=True, capture_output=True) + + print(f" โœ… OGG converted: {OUTPUT_FILE.name}") + + # Delete MP3 (keep only OGG) + mp3_path.unlink() + print(f" ๐Ÿ—‘๏ธ MP3 deleted (OGG kept)") + + except (subprocess.CalledProcessError, FileNotFoundError) as e: + print(f" โš ๏ธ ffmpeg not found - keeping MP3 format") + print(f" ๐Ÿ’ก Install ffmpeg: brew install ffmpeg") + # Rename MP3 to final output + mp3_path.rename(OUTPUT_FILE.with_suffix('.mp3')) + + print() + print("=" * 60) + print("๐ŸŽ‰ SUCCESS!") + print() + print(f"๐Ÿ“‚ File saved: {OUTPUT_FILE}") + print(f"๐Ÿ“ File size: {OUTPUT_FILE.stat().st_size if OUTPUT_FILE.exists() else OUTPUT_FILE.with_suffix('.mp3').stat().st_size} bytes") + print() + print("๐ŸŽฎ Ready to test in game!") + print() + print("๐Ÿ’ก To play in terminal:") + print(f" afplay {OUTPUT_FILE}") + print() + + return True + + except Exception as e: + print(f"โŒ Error: {e}") + return False + +def main(): + """Main entry point""" + success = asyncio.run(generate_gronk_test()) + + if success: + print("โœ… Voice generation complete!") + sys.exit(0) + else: + print("โŒ Voice generation failed!") + sys.exit(1) + +if __name__ == '__main__': + main()