Download examples/01_quickstart.py from milansharma94/Resona: direct link, hf CLI and curl.
- Browser
- Download file 808 Bytes
-
https://huggingface.co/milansharma94/Resona/resolve/main/examples/01_quickstart.py
- Command line
-
hf download hf://milansharma94/Resona/examples/01_quickstart.py
-
curl -L -o 01_quickstart.py https://huggingface.co/milansharma94/Resona/resolve/main/examples/01_quickstart.py
808 Bytes
| """ | |
| Resona Quickstart Example | |
| 5-line synthesis script using the Resona Audio Engine. | |
| """ | |
| import sys | |
| import os | |
| # Add repo to path | |
| sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) | |
| from resona import ResonaPipeline | |
| def main(): | |
| print("Initializing Resona Pipeline...") | |
| pipeline = ResonaPipeline(voice="anjura", language="hinglish") | |
| text = "Resona audio engine se speech generate karna super fast aur natural hai." | |
| output_wav = os.path.join(os.path.dirname(__file__), "quickstart_output.wav") | |
| print(f"Synthesizing: '{text}'") | |
| result = pipeline.synthesize(text, output_path=output_wav, speed=0.95) | |
| print(f"[SUCCESS] Audio generated in {result.duration_seconds:.2f}s!") | |
| print(f"Saved to: {output_wav}") | |
| if __name__ == "__main__": | |
| main() | |