Repository navigation
feat(avatars): avatar library, TextToVideo toggle and avatar clips - #351
Merged
Merged
Conversation
text_to_speech is a top-level config section, not a tools.<key> entry, so reading only `infer config get tools` never listed TextToSpeech. Read the full config dump and match each tool by JSON pointer instead.
…commands The CLI owns the avatar library in ~/.infer/avatars/<name>/. The desktop shells out to it: import from a picked photo or a camera snapshot staged in a temp file, with create's stdout streamed as progress, plus list and delete. Adds the asset scope for previews and the macOS camera usage string.
text_to_video.enabled is off by default and restarts the gateway with VIDEOS_ENABLED=true when saved; TextToVideo joins the tools list. The Avatars tab imports or snaps a front photo, shows the generated views and deletes avatars, next to a plain consent and provider note. ElevenLabs joins the API keys the gateway can use.
A video clip's avatar field survives parse and save, and the clip is labelled with the avatar's name and striped in its colour, as spoken clips are for their voice sample.
An avatar clip is a video-track clip over its spoken clip, rendered with TextToVideo from that clip's wav. The voice stays on the audio track, so export and redo work unchanged; only draft avatar clips are rendered.
Contributor
|
🎉 This PR is included in version 0.51.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This is the desktop half of talking avatars. Users keep named portraits in
~/.infer/avatars/<name>/, and the agent renders lip-synced clips from them in Content projects. The CLI owns the library and the render (infer avatarsand theTextToVideotool, shipped ininferv0.206.0; the flox manifest already pins v0.208.2). The desktop only wraps the commands, exposes the toggle, teaches the skill and shows the clips.Stacked on #350, which lets the tools dropdown see top-level config keys like
text_to_video. Review that one first.Closes #311.
Design: paired clips
Export mixes a video clip's own sound only when
source_audioiskeep, so an avatar clip keeps its voice on the audio track:id: "<spoken id>-avatar", withavatar,voice_sampleandstatus, rendered from that clip's wav.As a result, Export, Redo voice and Redo drafts work unchanged, and
timeline.rsexport is untouched. When a spoken clip is re-synthesized, the skill marks its avatar clip draft. Only draft avatar clips are rendered.Changes
backend/src/avatars.rswith four commands:list_avatars,import_avatar(Rust-side picker),snapshot_avatar(webview camera JPEG staged in a temp file) anddelete_avatar, all shelling out toinfer avatars.agent::infer_commandis extracted so the streaming spawn shares the env setup.text_to_video_enabled(text_to_video.enabled), off by default.spawn_gatewaysetsVIDEOS_ENABLED=truewhen it is on.TextToVideojoins the tools list.~/.infer/avatars/**is added to the asset scope, andsafeImageSrcaccepts it.NSCameraUsageDescriptionis added toInfo.plist.parseTimelinekeeps a clip'savatar(it was dropped on the first UI save).<avatar>: <file>and striped insampleColour(avatar).video-editing)TextToVideo { avatar, audio, output_path }, copy intomedia/, keep avatar clips in step with their spoken clips, stop before export.avatar-clip.yamlandavatar-clipscenario. Mock mode is scenario-driven with no fake renderer: the clip points at the seededmedia/logo.png.~/.infer/avatars/<name>/layout, the provider/privacy note, and the ElevenLabs key.Verification
bun run build,cargo fmt --check, clippy-D warnings,cargo test.bun test: 178 pass.task e2e -- tests/avatar-clip.yamlandtests/captions.yamlpass on macOS.infer avatars createfrom Settings (it calls the paid image edit API)TextToVideorender, which needs an ElevenLabs keyCross-repo
None needed: the CLI and gateway already ship the feature. The docs for the CLI side landed via inference-gateway/docs#727; the desktop side is tracked in inference-gateway/docs#839.