-
Notifications
You must be signed in to change notification settings - Fork 0
feat: rename package and CLI to SynthBanshee #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,4 +31,4 @@ repos: | |
| - pydantic>=2.6 | ||
| - types-PyYAML | ||
| args: ["--ignore-missing-imports"] | ||
| files: ^avdp/ | ||
| files: ^synthbanshee/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,104 @@ | ||
| # SynthBanshee | ||
|
|
||
| **SynthBanshee** is a config-driven pipeline for generating large-scale synthetic Hebrew audio | ||
| datasets. It is part of the [AVDP](https://datahack.org.il) (Audio Violence Dataset Project) | ||
| initiative run by DataHack, which produces training data for two AI safety products: | ||
|
|
||
| - **She-Proves** — a smartphone app that passively monitors for domestic violence incidents and | ||
| preserves audio evidence for legal use | ||
| - **Elephant in the Room (הפיל שבחדר)** — a Raspberry Pi–class device in social-work offices that | ||
| alerts security when a social worker is being physically threatened | ||
|
|
||
| The goal of SynthBanshee is to supply AI teams with a wide, deliberate distribution of voices, | ||
| acoustic conditions, and violence types while real-data (actor recording) pipelines are built in | ||
| parallel. Synthetic-to-real gap is expected and documented. | ||
|
|
||
| --- | ||
|
|
||
| ## How it works | ||
|
|
||
| Every clip is produced by four sequential pipeline stages: | ||
|
|
||
| ``` | ||
| SceneConfig (YAML) | ||
| → [1] Script Generator LLM fills a Jinja2 template → dialogue JSON | ||
| → [2] TTS Renderer Azure he-IL SSML → per-speaker WAV segments | ||
| → [3] Acoustic Augmenter Room IR + device profile + noise → scene WAV | ||
| → [4] Label Generator Script structure + augmentation log → AVDP-schema JSONL | ||
| ``` | ||
|
|
||
| Output per clip: `{clip_id}.wav` + `{clip_id}.txt` (Hebrew transcript) + `{clip_id}.json` (metadata). | ||
|
|
||
| Audio spec: **16 kHz · mono · 16-bit PCM · −1.0 dBFS peak · ≥ 0.5 s silence pad**. | ||
|
|
||
| --- | ||
|
|
||
| ## Dataset tiers | ||
|
|
||
| | Tier | Description | Target (per project) | | ||
| |---|---|---| | ||
| | A | Clean TTS, no acoustic augmentation | 1,000 clips | | ||
| | B | Room simulation + device profile + background noise | 2,000 clips | | ||
| | C | Hard negatives / confusors (arguments that de-escalate, ambient sounds) | 1,000 clips | | ||
|
|
||
| Two projects — **She-Proves** (3–6 min clips, apartment rooms) and **Elephant in the Room** | ||
| (1–4 min clips, clinic/welfare offices) — each receive the full tier stack. | ||
|
|
||
| --- | ||
|
|
||
| ## Label taxonomy | ||
|
|
||
| Labels use a three-level hierarchy (no binary Violence/Non-Violence): | ||
|
|
||
| 1. **Violence typology** (scene): `SV` · `IT` · `NEG` · `NEU` | ||
| 2. **Tier 1 category** (event): `PHYS` · `VERB` · `DIST` · `ACOU` · `EMOT` · `NONE` | ||
| 3. **Tier 2 subtype** (event): e.g. `PHYS_HARD` · `VERB_THREAT` · `DIST_SCREAM` | ||
|
|
||
| Full taxonomy: `configs/taxonomy.yaml`. | ||
|
|
||
| --- | ||
|
|
||
| ## Current status | ||
|
|
||
| Phase 0 (pipeline foundation) is complete. Phase 1 (500 Tier A clips/project) is next. | ||
|
|
||
| | Phase | Deliverable | Status | | ||
| |---|---|---| | ||
| | 0 | Single spec-compliant clip end-to-end | **Done** | | ||
| | 1 | 500 Tier A clips/project | In progress | | ||
| | 2 | 1,000–1,500 Tier B clips/project | Planned | | ||
| | 3 | 4,000 clips/project, all tiers | Planned | | ||
|
|
||
| --- | ||
|
|
||
| ## Quick start | ||
|
|
||
| ```bash | ||
| # Install (requires Python ≥ 3.11 and uv) | ||
| uv pip install -e . | ||
|
|
||
| # Generate a clip from a scene config | ||
| synthbanshee generate --config configs/scenes/test_scene_001.yaml | ||
|
|
||
| # Validate an existing clip | ||
| synthbanshee validate data/he/clip_001.wav | ||
| ``` | ||
|
|
||
| API credentials required (set in environment or `.env`): | ||
|
|
||
| ``` | ||
| AZURE_TTS_KEY=... | ||
| AZURE_TTS_REGION=... | ||
| ANTHROPIC_API_KEY=... # for script generation | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Docs | ||
|
|
||
| | Document | Contents | | ||
| |---|---| | ||
| | `docs/spec.md` | Audio format, file naming, label schema, IAA protocol | | ||
| | `docs/implementation_plan.md` | Phased milestones, module map, API cost estimates | | ||
| | `docs/design_approaches.md` | Design decisions and rationale | | ||
| | `CLAUDE.md` | Claude Code context guide (pipeline constraints, conventions) | |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| """Audio augmentation pipeline: room simulation, device profiles, noise mixing, preprocessing.""" | ||
|
|
||
| from avdp.augment.preprocessing import PreprocessingResult, preprocess, validate_audio | ||
| from synthbanshee.augment.preprocessing import PreprocessingResult, preprocess, validate_audio | ||
|
|
||
| __all__ = ["PreprocessingResult", "preprocess", "validate_audio"] |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """Config schema and validation for the AVDP pipeline.""" | ||
|
|
||
| from synthbanshee.config.acoustic_config import AcousticSceneConfig, BackgroundEvent | ||
| from synthbanshee.config.scene_config import SceneConfig | ||
| from synthbanshee.config.speaker_config import SpeakerConfig | ||
| from synthbanshee.config.taxonomy import load_taxonomy | ||
|
|
||
| __all__ = [ | ||
| "AcousticSceneConfig", | ||
| "BackgroundEvent", | ||
| "SceneConfig", | ||
| "SpeakerConfig", | ||
| "load_taxonomy", | ||
| ] |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| """Label schema, auto-generator, and IAA utilities.""" | ||
|
|
||
| from avdp.labels.schema import ClipMetadata, EventLabel, WeakLabel | ||
| from synthbanshee.labels.schema import ClipMetadata, EventLabel, WeakLabel | ||
|
|
||
| __all__ = ["ClipMetadata", "EventLabel", "WeakLabel"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| """Dataset packaging: assembly, manifests, splits, and clip validation.""" | ||
|
|
||
| from avdp.package.validator import ValidationResult, validate_clip | ||
| from synthbanshee.package.validator import ValidationResult, validate_clip | ||
|
|
||
| __all__ = ["ValidationResult", "validate_clip"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| """TTS rendering: SSML builder, Azure provider, render cache.""" | ||
|
|
||
| from avdp.tts.renderer import TTSRenderer | ||
| from avdp.tts.ssml_builder import SSMLBuilder | ||
| from synthbanshee.tts.renderer import TTSRenderer | ||
| from synthbanshee.tts.ssml_builder import SSMLBuilder | ||
|
|
||
| __all__ = ["SSMLBuilder", "TTSRenderer"] |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.