Spaces:
Running on Zero
Running on Zero
A newer version of the Gradio SDK is available: 6.20.0
Repository Guidelines
Project Structure & Module Organization
app.pyis the Gradio entrypoint. It calls the local Ollama model, runs TTS, and serves the UI on127.0.0.1:7860.synth.pycontains the audio-processing pipeline that transforms a WAV file into the droid-style output.pyproject.tomldefines the project metadata and Python version requirement (>=3.12).- The repository currently has no dedicated
tests/,assets/, or package directories, so keep new modules small and colocated until the structure grows.
Build, Test, and Development Commands
python app.pystarts the local web app.python synth.pyruns the synthesizer againstinput.wavand writesoutput.wavfor quick audio checks.python -m pip install gradio ollama numpy scipyinstalls the runtime dependencies used by the current code.- There is no formal build step yet; if packaging is added later, keep the command in
pyproject.tomland document it here.
Coding Style & Naming Conventions
- Use standard Python 3.12 style: 4-space indentation, snake_case for functions and variables, and ALL_CAPS only for constants.
- Prefer short, explicit helper functions over large inline blocks. Keep file names lowercase with underscores when adding modules.
- Match the existing pragmatic style: minimal abstraction, direct control flow, and comments only where the audio logic is non-obvious.
Testing Guidelines
- No automated test framework is currently configured.
- When adding tests, place them under
tests/and name themtest_*.py. - For now, verify changes manually by running
python synth.pyand the Gradio app, then confirming the generated WAV plays correctly.
Commit & Pull Request Guidelines
- Recent commit messages are short, lowercase, and imperative or descriptive, such as
add config.toml for Codex git commit settings. - Keep commits focused on one change and avoid bundling unrelated refactors.
- Pull requests should explain the user-visible change, list any local verification performed, and include screenshots or sample audio when UI or sound output changes.
Configuration Notes
- This app expects a local Ollama server and
espeak-ngto be available on the PATH. - Temporary WAV files are created during generation and cleaned up automatically; avoid committing generated audio artifacts.