braidio 0.0.98__tar.gz → 0.0.99__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {braidio-0.0.98 → braidio-0.0.99}/PKG-INFO +1 -1
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/__init__.py +27 -21
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_common.py +67 -5
- {braidio-0.0.98 → braidio-0.0.99}/pyproject.toml +1 -1
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms.py +27 -6
- {braidio-0.0.98 → braidio-0.0.99}/.editorconfig +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/.gitattributes +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/.gitignore +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/LICENSE +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/README.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/__init__.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/_paths.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/bodies/__init__.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/bodies/_domain.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/bodies/_render_nodes.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/bodies/_tiers.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/bodies/_video.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/captions.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/compose.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/conversation.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/cost.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/data/skills/braidio/SKILL.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/data/skills/braidio-commentary-video/SKILL.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/defaults.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/delivery.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/downloads.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/formats.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/genre.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/importing/__init__.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/importing/__main__.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/importing/_catalog.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/importing/_manifest.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/importing/_writer.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/kinds.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/leveling.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/markdown_script.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/__init__.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/_docs.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/_guide.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/_helpers.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/_media.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/credentials.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/metering.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/tools.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/mcp/workspace.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/multivoice.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/music.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/pacing.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/project.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/provenance.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/relevance.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/render.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/rights.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/script.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/sources.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/structure.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/style.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/textprep.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/timeline.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_asset_refs.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_dialogue.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_episode.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_ingest.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_narration.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_segment.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_takes.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_video_cut.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_video_panels.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/transforms/_voice.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/tts.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/video.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/voice_library.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/weave.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/braidio/weave_config.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/conftest.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/Extraction and nw-App Design.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/research/commentary-formats-and-styles.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/research/conversational-vs-narration-tts.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/research/notebooklm-and-conversational-pacing.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/README.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/anti-platitude-checklist.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/commentary-voice-guide.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/_style-groups.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/amanda-dobbins.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/david-sims.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/griffin-newman.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/helen-molesworth.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/hrishikesh-hirway.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/jason-mantzoukas.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/john-mcwhorter.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/jon-caramanica.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/june-diane-raphael.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/karina-longworth.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/katy-hessel.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/louis-theroux.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/mallory-rubin.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/melvyn-bragg.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/michael-barbaro.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/nate-sloan-charlie-harding.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/paul-scheer.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/sean-fennessey.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/talk-art.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/style/voices/yasi-salek.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/misc/docs/youtube_ingest_credentials.md +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/_audio.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_body_schema_stability.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_conversation.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_cost.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_credits_card.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_defaults.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_delivery.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_downloads.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_expressiveness.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_formats.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_genre_placement.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_graph_speak.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_importing.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_leveling.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_markdown_script.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_mcp.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_mcp_caller_key.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_media_auth.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_multivoice.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_music.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_namespaced_source.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_nw_app.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_pacing.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_packaging.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_render_settings.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_script.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_sources.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_speak_seam.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_structure.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_textprep_style.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_timeline.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms_dialogue.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms_episode_members.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms_rights.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms_secrets.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_transforms_structure.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_tts_api_key.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_turn_overlap.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_video.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_video_bodies.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_video_footage.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_video_transforms.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_voice_library.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_weave.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_weave_config.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_weave_master.py +0 -0
- {braidio-0.0.98 → braidio-0.0.99}/tests/test_wire_descriptions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: braidio
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.99
|
|
4
4
|
Summary: Weave narration with extracted media segments into audiovisual productions
|
|
5
5
|
Project-URL: Homepage, https://github.com/thorwhalen/braidio
|
|
6
6
|
Project-URL: Repository, https://github.com/thorwhalen/braidio
|
|
@@ -44,6 +44,8 @@ from nw import TransformInputs
|
|
|
44
44
|
|
|
45
45
|
from braidio.transforms._common import (
|
|
46
46
|
ELEVENLABS_SECRET,
|
|
47
|
+
fresh_ids_pass,
|
|
48
|
+
note_output,
|
|
47
49
|
TIER_WEAVE_CONFIG,
|
|
48
50
|
TIER_PRODUCTION_STRUCTURE,
|
|
49
51
|
TIER_RENDER_PROFILE,
|
|
@@ -381,29 +383,33 @@ def weave_project(
|
|
|
381
383
|
|
|
382
384
|
def run(transform, *primary, secrets=None):
|
|
383
385
|
results.append(_execute(transform, project, *primary, secrets=secrets))
|
|
384
|
-
|
|
386
|
+
out = results[-1].annotations[0]
|
|
387
|
+
note_output(project, out) # a node the held walk did not know: walk again
|
|
388
|
+
return out
|
|
385
389
|
|
|
386
390
|
render_by_authoring_id = {}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
391
|
+
# one freshness walk per write, not ~two per beat (braidio#171)
|
|
392
|
+
with fresh_ids_pass():
|
|
393
|
+
try:
|
|
394
|
+
for beat in ing.narration_beats:
|
|
395
|
+
run(voice, beat)
|
|
396
|
+
render_by_authoring_id[beat.id] = run(narration, beat, secrets=secrets)
|
|
397
|
+
for beat in ing.dialogue_beats:
|
|
398
|
+
render_by_authoring_id[beat.id] = run(dialogue, beat, secrets=secrets)
|
|
399
|
+
for clip in ing.audio_clips:
|
|
400
|
+
render_by_authoring_id[clip.id] = run(segment, clip)
|
|
401
|
+
|
|
402
|
+
# A scene break renders no node of its own — the authoring annotation
|
|
403
|
+
# IS the member, and the episode transform turns it into a sting or a
|
|
404
|
+
# pause.
|
|
405
|
+
members = tuple(
|
|
406
|
+
auth if kind == "scene_break" else render_by_authoring_id[auth.id]
|
|
407
|
+
for kind, auth in ing.ordered
|
|
408
|
+
)
|
|
409
|
+
woven = run(episode, *members)
|
|
410
|
+
except Exception as exc: # annotated and re-raised, never swallowed
|
|
411
|
+
exc.weave_receipt = WeaveReceipt.of(None, results, failed=True)
|
|
412
|
+
raise
|
|
407
413
|
return WeaveReceipt.of(woven, results) if return_receipt else woven
|
|
408
414
|
|
|
409
415
|
|
|
@@ -17,7 +17,10 @@ Tier-name constants mirror :mod:`braidio.bodies._tiers`; body schemas live in
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
import uuid
|
|
20
|
+
from contextlib import contextmanager
|
|
21
|
+
from contextvars import ContextVar
|
|
20
22
|
from pathlib import Path
|
|
23
|
+
from typing import Optional
|
|
21
24
|
from urllib.parse import urlparse
|
|
22
25
|
from urllib.request import url2pathname
|
|
23
26
|
|
|
@@ -194,9 +197,9 @@ def fresh_equivalent(project, skeleton: Annotation) -> Annotation | None:
|
|
|
194
197
|
(thorwhalen/braidio#51). Reuse is by *value*, never by id alone.
|
|
195
198
|
|
|
196
199
|
This is what makes re-running the weave idempotent — a no-op re-run adds
|
|
197
|
-
no voice-assignment, no render, no episode. It
|
|
198
|
-
per call,
|
|
199
|
-
|
|
200
|
+
no voice-assignment, no render, no episode. It reads :func:`fresh_ids`:
|
|
201
|
+
one full freshness walk per call, or one per write inside a
|
|
202
|
+
:func:`fresh_ids_pass` (braidio#171).
|
|
200
203
|
|
|
201
204
|
Only the annotation half of ``was_derived_from`` is compared. Since nw#55 a
|
|
202
205
|
declared input schema also contributes the artifact ids its body names
|
|
@@ -228,12 +231,71 @@ def fresh_equivalent(project, skeleton: Annotation) -> Annotation | None:
|
|
|
228
231
|
|
|
229
232
|
|
|
230
233
|
def fresh_ids(project) -> set:
|
|
231
|
-
"""The ids of every annotation nw's freshness walk verifies as fresh.
|
|
234
|
+
"""The ids of every annotation nw's freshness walk verifies as fresh.
|
|
235
|
+
|
|
236
|
+
One full walk of the graph, unless a :func:`fresh_ids_pass` is open, in
|
|
237
|
+
which case the walk is reused until :func:`note_output` drops it
|
|
238
|
+
(braidio#171).
|
|
239
|
+
"""
|
|
232
240
|
import nw
|
|
233
241
|
|
|
234
|
-
|
|
242
|
+
cache = _FRESH_PASS.get()
|
|
243
|
+
key = str(Path(project.root).resolve())
|
|
244
|
+
if cache is not None and key in cache:
|
|
245
|
+
return cache[key]
|
|
246
|
+
ids = {
|
|
235
247
|
v.annotation.id for v in nw.stale_verdicts_all(project.root) if not v.is_stale
|
|
236
248
|
}
|
|
249
|
+
if cache is not None:
|
|
250
|
+
cache[key] = ids
|
|
251
|
+
return ids
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
#: The walks a :func:`fresh_ids_pass` reuses, by project root (``None``: no pass).
|
|
255
|
+
_FRESH_PASS: ContextVar[Optional[dict]] = ContextVar("braidio_fresh_pass", default=None)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
@contextmanager
|
|
259
|
+
def fresh_ids_pass():
|
|
260
|
+
"""Reuse one freshness walk per project until something is written.
|
|
261
|
+
|
|
262
|
+
Freshness changes only through a write, and adding a node changes no
|
|
263
|
+
*other* node's freshness (it is a function of each node's own parents),
|
|
264
|
+
so a pass that writes nothing needs one walk however many lookups it does.
|
|
265
|
+
The driver reports each stage's output with :func:`note_output`, which
|
|
266
|
+
drops the walk when that output is a node it did not know (a write);
|
|
267
|
+
``weave_project`` does, so a no-op re-weave is one walk instead of about
|
|
268
|
+
two per beat (braidio#171). Nested passes share the outer one. Two weaves
|
|
269
|
+
of ONE project at once were already racy (no per-project lock); a pass
|
|
270
|
+
widens the stale window from one lookup to the pass.
|
|
271
|
+
"""
|
|
272
|
+
if _FRESH_PASS.get() is not None:
|
|
273
|
+
yield
|
|
274
|
+
return
|
|
275
|
+
token = _FRESH_PASS.set({})
|
|
276
|
+
try:
|
|
277
|
+
yield
|
|
278
|
+
finally:
|
|
279
|
+
_FRESH_PASS.reset(token)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def note_output(project, annotation) -> None:
|
|
283
|
+
"""Tell the open pass a stage produced ``annotation``.
|
|
284
|
+
|
|
285
|
+
A node the held walk does not know as fresh was just written (a new or an
|
|
286
|
+
adopted render), so the walk is dropped and the next lookup walks again.
|
|
287
|
+
Nothing is walked here: with no walk held there is nothing to drop, which
|
|
288
|
+
keeps a first weave (no candidates, no lookups) free of walks it never
|
|
289
|
+
needed (braidio#171 review). Only correct for a driver whose stages return
|
|
290
|
+
the node they wrote, as every braidio transform does.
|
|
291
|
+
"""
|
|
292
|
+
cache = _FRESH_PASS.get()
|
|
293
|
+
if cache is None:
|
|
294
|
+
return
|
|
295
|
+
key = str(Path(project.root).resolve())
|
|
296
|
+
held = cache.get(key)
|
|
297
|
+
if held is not None and annotation.id not in held:
|
|
298
|
+
del cache[key]
|
|
237
299
|
|
|
238
300
|
|
|
239
301
|
def freshest(project, annotations):
|
|
@@ -1633,15 +1633,17 @@ def test_a_voice_flip_and_back_weaves_in_the_voice_the_voice_stage_chose(
|
|
|
1633
1633
|
|
|
1634
1634
|
monkeypatch.setattr(braidio, "narrate", spy)
|
|
1635
1635
|
|
|
1636
|
-
def
|
|
1636
|
+
def voices(voice):
|
|
1637
|
+
"""The voice of EVERY narration take in the mix (a clip has none)."""
|
|
1637
1638
|
monkeypatch.setenv("BRAIDIO_TTS_VOICE", voice)
|
|
1638
1639
|
episode = braidio.weave_project(project, script, source=source)
|
|
1639
|
-
|
|
1640
|
+
members = [str(m) for m in episode.body["ordered_member_ids"]]
|
|
1641
|
+
return {voice_of_take[m] for m in members if m in voice_of_take}
|
|
1640
1642
|
|
|
1641
|
-
assert
|
|
1642
|
-
assert
|
|
1643
|
-
assert
|
|
1644
|
-
assert
|
|
1643
|
+
assert voices("voiceA") == {"voiceA"}
|
|
1644
|
+
assert voices("voiceB") == {"voiceB"}
|
|
1645
|
+
assert voices("voiceA") == {"voiceA"} # not the most recent fresh
|
|
1646
|
+
assert voices("voiceB") == {"voiceB"} # not the oldest fresh
|
|
1645
1647
|
|
|
1646
1648
|
|
|
1647
1649
|
def test_genre_status_names_the_episode_a_revert_returned(
|
|
@@ -2131,3 +2133,22 @@ def test_status_reports_two_overrides_instead_of_raising(
|
|
|
2131
2133
|
status = project.genre_status()
|
|
2132
2134
|
assert status["next_step"]["op"] == "restore_take"
|
|
2133
2135
|
assert "at most one" in status["next_step"]["why"]
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
def test_a_noop_reweave_walks_freshness_once(
|
|
2139
|
+
project, script_and_source, patched_synthesis, monkeypatch
|
|
2140
|
+
):
|
|
2141
|
+
"""braidio#171: freshness changes only through a write, so a re-weave that
|
|
2142
|
+
writes nothing needs one walk of the graph, not about two per beat."""
|
|
2143
|
+
import nw
|
|
2144
|
+
|
|
2145
|
+
script, source = script_and_source
|
|
2146
|
+
first = braidio.weave_project(project, script, source=source)
|
|
2147
|
+
walks = []
|
|
2148
|
+
real = nw.stale_verdicts_all
|
|
2149
|
+
monkeypatch.setattr(
|
|
2150
|
+
nw, "stale_verdicts_all", lambda root: walks.append(root) or real(root)
|
|
2151
|
+
)
|
|
2152
|
+
again = braidio.weave_project(project, script, source=source)
|
|
2153
|
+
assert again.id == first.id
|
|
2154
|
+
assert len(walks) == 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{braidio-0.0.98 → braidio-0.0.99}/misc/docs/research/notebooklm-and-conversational-pacing.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|