speak-with-profile
Original:🇺🇸 English
Translated
3 scripts
Profile-aware speech workflow for narrated notes, spoken drafts, audio summaries, accessibility reads, and other text-to-speech tasks. Use when one front-door workflow should resolve voice profiles, enforce disclosure, and apply manifest tracking before delegating to built-in `$speech` or a deterministic local CLI path.
3installs
Added on
NPX Install
npx skill4agent add gaelic-ghost/productivity-skills speak-with-profileTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Speak With Profile
Use this skill as the front door for speech tasks when the workflow needs reusable profiles, consistent disclosure, and reproducible reporting. Treat built-in as the primary synthesis engine, and keep this skill as the policy and profile adapter.
$speechPurpose
- Normalize speech requests with deterministic profile precedence.
- Enforce disclosure and manifest policy consistently.
- Delegate generation to by default in Codex App/CLI conversations.
$speech - Keep a script fallback for deterministic local/automation execution.
- Support productivity workflows such as narrated notes, spoken drafts, audio summaries, and hands-free review without dropping accessibility-friendly profile options.
Required UX pattern
- Route speech requests through first.
$speak-with-profile - Resolve profile/default/override values.
- Require disclosure text in end-user output context.
- Delegate generation to built-in using resolved fields.
$speech - Record effective configuration in a run manifest.
Execution modes
- (default for conversational usage): use built-in
delegatefor synthesis.$speech - (fallback for scripted/automation runs): invoke a compatible speech CLI via
local-cli.scripts/speak_with_profile.py
Use unless there is a concrete reason to run the local script path.
delegateInputs needed
- Input source: either the exact text to speak or a path to a text file.
- Profile choice: a ID if the caller wants a named profile, or no profile if baseline defaults are acceptable.
--profile - Profile data source: a path when profile-based resolution is required.
--profiles-file - Delivery guidance: any explicit voice, instructions, speed, or format overrides the caller wants to force.
- Output intent: target output path or filename expectations for the generated audio.
- Execution preference: whether built-in is acceptable or deterministic
$speechbehavior is required.local-cli - Playback intent: whether the generated file should also be played locally with or
open.afplay - Optional skill-local workflow customization from or
config/customization.yaml.config/customization.template.yaml
Hard constraints
- Do not bypass this skill for speech tasks in this repository workflow.
- Do not modify built-in behavior assumptions; adapt inputs/outputs around it.
$speech - Never modify a compatible downstream speech CLI from this skill; adapt inputs and outputs around it.
- Use built-in voices only.
- Require for live API calls.
OPENAI_API_KEY
Disclosure policy
Always include a clear disclosure in user-visible output when speech is produced, for example:
- "This audio was generated by AI text-to-speech."
If a profile provides , use it. Otherwise, use the default disclosure above.
disclosureProfile resolution order
- Explicit wrapper flags (,
--voice,--speed,--instructions, output path flags).--format - Selected profile ().
--profile - Default profile from profiles file ().
default_profile - Baseline defaults (,
voice=cedar, formatspeed=1.0, modelmp3).gpt-4o-mini-tts-2025-12-15
Workflow configuration precedence
- Explicit user input and wrapper flags.
- Skill-local workflow customization in , when present.
config/customization.yaml - Skill-local defaults in .
config/customization.template.yaml - Workflow defaults described in this skill and .
references/wrapper-contract.md
The local wrapper loads supported customization values from and at runtime. Use skill-local customization to guide wrapper defaults and agent decisions. remains documentation-only because the wrapper script implements only , while the skill-level workflow still treats as the default conversational path.
config/customization.yamlconfig/customization.template.yamlpreferredExecutionModelocal-clidelegateWorkflow
- Resolve input text source (or
--text).--text-file - Resolve effective workflow settings using explicit input, skill-local customization, then workflow defaults.
- Resolve profile and defaults using .
references/wrapper-contract.md - Validate configuration against .
references/profile-schema.md - Choose execution mode:
- : call built-in
delegatewith resolved fields.$speech - : run
local-cli.scripts/speak_with_profile.py
- Emit/validate run manifest and include disclosure.
Output Contract
- : return a user-visible result that confirms speech generation intent, includes the disclosure text, and surfaces the resolved speech settings that matter for the request.
delegate - : produce an audio file at the requested or resolved output path and write an adjacent
local-clifile.<audio>.manifest.json - manifest/result reporting must include:
local-cli- output audio path
- manifest path
- disclosure text
- execution mode ()
local-cli - playback result when or
openis usedafplay
- Playback failures must remain explicit rather than being treated as silent success.
Failure modes
- Missing : stop before generation and tell the caller that the local environment must provide the API key.
OPENAI_API_KEY - Missing text source or unreadable text file: fail fast rather than guessing input content.
- Missing profiles file when is requested: fail fast and require the caller to provide a valid JSON or YAML profiles file.
--profile - Invalid profiles file: stop on schema/parse errors and surface the validation failure clearly.
- Unknown profile ID: fail with the known profile list from the supplied profiles file.
- Input over 4096 characters: fail fast and require the caller to split or chunk the input before running.
- Missing compatible speech CLI on the local CLI path: stop and report that must point to a valid speech CLI implementation.
--tts-cli-path - Downstream speech CLI failure: propagate the subprocess failure rather than masking it.
- Playback failure with or
open: return the deterministic playback failure outcome, record it in the manifest, and respectafplay/--stop-on-error.--no-stop-on-error
References
- Profile schema and validation rules:
references/profile-schema.md - Starter profile set and examples:
references/starter-profiles.md - Adapter contract and mode behavior:
references/wrapper-contract.md - Skill-local workflow customization:
references/customization.md
Validation helper
Use to verify required manifest keys:
scripts/validate_manifest.pybash
uv run --group dev python speak-with-profile/scripts/validate_manifest.py path/to/output/file.manifest.json