Gemini Omni 标志

Gemini Omni

社区
danicat
gemini-omni

使用 Gemini Omni 1.2 Flash(gemini-omni-1.2-flash)和 Gemini Omni 1.1 Flash(gemini-omni-1.1-flash),通过 uv run scripts/omni.py 和 Google Gen AI SDK(Interactions API)生成对话式视频、编辑多模态视频、插补首尾帧、扩展视频,并在原生同步音频的支持下单独提升视频分辨率。支持 Vertex AI / Gemini Enterprise(Application Default Credentials)、时长为 3s 至 15s、分辨率为 360p 至 4K(24 FPS)的视频片段、最多 6-10 张参考图像和 3 个参考视频,以及 2D 游戏过场动画集成。在生成游戏过场动画、标题动画、宣传视频,或编辑和扩展视频片段时启用。

概览

发布者danicat
代码仓库skills
技能名称gemini-omni
星标数
24
复刻数
4
附带文件
4
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 danicat 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Gemini Omni AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/danicat/skills/tree/main/media/gemini-omni
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/danicat/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/media/gemini-omni .claude/skills/gemini-omni
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Gemini Omni,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Gemini Omni。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Gemini Omni 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Gemini Omni 1.2 Flash Video Generation & Editing Skill (gemini-omni)

Generate, edit, interpolate, extend, and upscale high-coherence video (360p to 4k MP4 at 24 FPS) with native synchronized audio (speech, dialogue, music, and sound effects) using Gemini Omni 1.2 Flash (gemini-omni-1.2-flash) via uv run scripts/omni.py and the Google Gen AI Interactions API (client.interactions.create).

[!CAUTION] Strict Fail-Fast Authentication Policy (Never Go Rogue): Never go rogue if scripts/omni.py fails.

  • Run uv run scripts/omni.py (or uv run skills/gemini-omni/scripts/omni.py) using Vertex AI / Gemini Enterprise Application Default Credentials (gcloud auth application-default login --billing-project YOUR_PROJECT_ID, GOOGLE_CLOUD_PROJECT, and GOOGLE_CLOUD_LOCATION="global").
  • If authentication fails in scripts/omni.py, stop immediately, report the exact authentication error message to the user, and ask them to configure their credentials (gcloud auth application-default login --billing-project YOUR_PROJECT_ID and export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID").
  • Never attempt unauthorized workarounds, never generate empty or mock .mp4 files, and never probe local credential stores outside standard environment variables and ADC.

Available Scripts

  • scripts/omni.py: PEP 723 standalone Python CLI (uv run scripts/omni.py) centered on Gemini Omni 1.2 Flash (gemini-omni-1.2-flash, with short aliases omni-1.2-flash, omni-1.2, 1.2, flash-1.2) and transitional gemini-omni-1.1-flash (1.1). Supports text-to-video, image-to-video, first-and-last-frame interpolation, multi-reference video generation, conversational video editing (--previous-interaction-id or -i video.mp4), video extension (--task extend), standalone video upscaling (--task upscale), reproducible seeds (--seed), Cloud Storage output (--gcs-uri), URI delivery polling (--delivery uri), optional 44.1 kHz stereo WAV audio extraction (--extract-audio), and Vertex AI / Gemini Enterprise ADC authentication.
  • scripts/test_omni.py: Automated unit and CLI test suite verifying gemini-omni-1.2-flash model resolution, 3s to 15s duration rules, upscale and extend task constraints, reference video limits, deprecated control tag warnings, and fail-fast Vertex AI ADC initialization.

Prerequisites: Vertex AI / Gemini Enterprise Setup (uv + scripts/omni.py)

scripts/omni.py declares inline PEP 723 metadata (requires-python = ">=3.10", dependencies = ["google-genai>=1.68.0", "google-auth>=2.0.0"]) so uv run resolves dependencies automatically in an isolated environment.

bash
# 1. Authenticate with Vertex AI / Gemini Enterprise (Application Default Credentials)
gcloud auth application-default login --billing-project YOUR_PROJECT_ID
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="global"
export GOOGLE_GENAI_USE_VERTEXAI="true"

# 2. Verify CLI flags and run the unit test suite
uv run scripts/omni.py --help
uv run scripts/test_omni.py

Trigger Conditions

Activate this skill whenever the user asks to:

  • Generate 3s to 15s video clips with synchronized dialogue, music, and sound effects from text prompts (gemini-omni-1.2-flash).
  • Animate a starting image or interpolate smoothly between a starting frame and an ending frame (3s to 10s), including seamless looping scenes.
  • Generate videos guided by up to 6 to 10 character, object, or style reference images and up to 3 reference video clips (~3s each).
  • Edit an existing video conversationally across multiple turns (--previous-interaction-id or -i source.mp4) while preserving unmentioned visual and audio elements.
  • Extend a video clip in 3s to 10s increments (using up to the final 10s as context, up to 30s total in the Gemini API or 40s on Vertex AI / Gemini Enterprise).
  • Upscale an existing 360p video to 720p or 1080p, or a 720p video to 1080p or 4k (--task upscale).

Companion Skills & Game Dev Studio Integration

In agy-game-studio, gemini-omni serves as the cutscene, animated intro, boss reveal, and trailer generation engine alongside the companion game development skills:

  • vibe-game-developer & game-design (GDD.md):
    • During game co-creation, game-design defines cutscene storyboards, boss intro sequences, and visual art direction in GDD.md, while vibe-game-developer routes video cutscene tasks to gemini-omni.
  • nano-banana + sprite-design -> gemini-omni (Consistent Character Cutscenes):
    • Pass character turnaround sheets or keyframe illustrations generated by nano-banana into uv run scripts/omni.py -i character_sheet.png so game cutscenes use the exact same character designs and environment palette as in-game sprites.
  • ebitengineer Audio Extraction (--extract-audio):
    • gemini-omni-1.2-flash generates MP4 videos with native synchronized audio (spoken dialogue, ambient music, and sound effects).
    • Pass --extract-audio ./assets/audio/cutscene.wav to extract the video's audio track as a 44,100 Hz 16-bit stereo PCM .wav file ready for Ebitengine's shared 44.1 kHz audio.Context.

Model Specifications (gemini-omni-1.2-flash vs. gemini-omni-1.1-flash)

Feature / ParameterGemini Omni 1.2 Flash (Default)Gemini Omni 1.1 Flash (Transition)
Canonical Model IDgemini-omni-1.2-flash (GA November 5, 2026)gemini-omni-1.1-flash, gemini-omni-1.1-flash-preview
CLI Short Aliasesomni-1.2-flash, omni-1.2, 1.2, flash-1.2omni-1.1-flash, omni-1.1, 1.1, flash-1.1
API SurfaceInteractions API (client.interactions.create; GenerateContent not supported)Interactions API (client.interactions.create)
Supported Region (Vertex AI)globalglobal
Input / Output Token Limits131,072 input tokens / 65,536 output tokens (260,640 on Enterprise)131,072 input tokens / 65,536 output tokens (173,760 on Enterprise)
ModalitiesText (In/Out), Image (In), Video with synchronized speech, music, and SFX (In/Out)Text (In/Out), Image (In), Video with synchronized audio (In/Out)
Video Duration (duration)3s to 15s (default 10s, whole seconds); 3s to 10s for 2-frame interpolation3s to 10s (default 10s, whole seconds)
Video Extension (extend)3s to 10s per turn (10s lookback window; up to 30s Gemini API / 40s Enterprise)3s to 10s per turn (up to 30s Gemini API / 40s Enterprise)
Standalone Video UpscalingSupported (task: "upscale"; 360p -> 720p/1080p, 720p -> 1080p/4k, zero input tokens)Not supported
Reference ImagesUp to 6 in Gemini API / 10 on Enterprise (up to 3 per character for 2 characters) across 3s to 15sUp to 6 in Gemini API / 10 on Enterprise (3s to 10s)
Reference VideosUp to 3 (~3s each) for 3s to 10s clips; 1 (~3s) for 11s to 15s clipsUp to 3 (~3s each) for 3s to 10s clips
Resolutions & Aspect Ratios360p, 720p (default), 1080p, 4k at 24 FPS; 16:9 (default), 9:16360p, 720p (default), 1080p, 4k at 24 FPS; 16:9 (default), 9:16
Lifecycle & Auto-RoutingActive GA model (retirement November 5, 2027 or later)Routes automatically to gemini-omni-1.2-flash starting December 3, 2026
WatermarkingInvisible SynthID watermark embedded in video frames and audioInvisible SynthID watermark embedded in video frames and audio
Reference Guidesgemini-omni-1-2-flash.mdgemini-omni-1-1-flash.md

[!IMPORTANT] Key Rules for Gemini Omni 1.2 Flash:

  1. Use Natural Language Instead of Control Tags: Do not include deprecated control tags (<FIRST_FRAME>, <LAST_FRAME>, <IMAGE_REF_0>, <VIDEO_REF_0>) in prompts for gemini-omni-1.2-flash. Describe how each image or video should be used in natural language ("Use the first image as the starting frame and the second image as the ending frame").
  2. Optional Task Fallback (--task): gemini-omni-1.2-flash automatically infers the task from natural language. If a prompt does not trigger the expected mode, pass --task (text_to_video, image_to_video, reference_to_video, edit, extend, or upscale). Note that --task upscale is always required when upscaling.
  3. Never Use Shut-Down gemini-omni-flash-preview: gemini-omni-flash-preview was shut down on October 22, 2026; scripts/omni.py rejects it immediately with a fail-fast validation error.

Deep Technical References

Consult the references/ directory for complete API schemas, task configurations, and SDK examples:

  • references/gemini-omni-1-2-flash.md: Complete reference for Gemini Omni 1.2 Flash (gemini-omni-1.2-flash), covering 3s to 15s video generation, natural-language multi-reference prompting, standalone video upscaling (task: "upscale"), conversational editing, extension, Vertex AI / Gemini Enterprise (global endpoint) workflows, and Python SDK patterns.
  • references/gemini-omni-1-1-flash.md: Reference for gemini-omni-1.1-flash and migration guidance to gemini-omni-1.2-flash ahead of the December 3, 2026 automatic routing cutover.
  • references/README.md: Index and quick reference for all Gemini Omni workflows.

Core Execution Workflows (uv run scripts/omni.py)

1. Text-to-Video (3s to 15s with Native Synchronized Audio)

bash
# Generate a 15-second 1080p video with synchronized dialogue, music, and sound effects
uv run scripts/omni.py \
  --vertexai \
  --project "$GOOGLE_CLOUD_PROJECT" \
  --model "gemini-omni-1.2-flash" \
  --resolution "1080p" \
  --aspect-ratio "16:9" \
  --duration "15s" \
  --seed 42 \
  --prompt '[0-5s] Wide establishing shot of a sunlit woodworking workshop with sawdust floating in warm lightbeams and soft acoustic guitar music. [5-10s] Medium shot of a craftsman planing a maple board with crisp wood-shaving sound effects. [10-15s] He looks up and says warmly: "Every piece tells a story."' \
  --output "./assets/video/workshop_15s.mp4"

2. Image-to-Video & First-and-Last-Frame Interpolation (3s to 10s)

Describe image roles in natural language instead of using deprecated angle-bracket tags:

bash
# 1. Animate a single starting frame (3s to 15s)
uv run scripts/omni.py \
  --vertexai \
  --input "./assets/sprites/knight_idle.png" \
  --resolution "1080p" \
  --duration "8s" \
  --prompt "Use this image as the starting frame. The camera slowly pushes in as the knight raises the glowing sword and wind whips across the cloak, accompanied by a low orchestral brass swell." \
  --output "./assets/video/knight_intro.mp4"

# 2. Interpolate between a starting frame and an ending frame (3s to 10s max)
uv run scripts/omni.py \
  --vertexai \
  --input "./assets/scenes/forest_sunrise.jpg" \
  --input "./assets/scenes/forest_winter.jpg" \
  --task "image_to_video" \
  --resolution "1080p" \
  --duration "10s" \
  --prompt "Use the first image as the starting frame and the second image as the ending frame. Transition smoothly from the lush green forest at sunrise to the snow-covered forest under a starry night sky with gentle wind chimes." \
  --output "./assets/video/season_transition.mp4"

3. Subject & Style Reference Video Generation (reference_to_video)

Pass up to 6 reference images (up to 10 on Vertex AI / Gemini Enterprise; up to 3 images per character for 2 characters) and up to 3 short reference videos (~3s each for 3s to 10s clips, or 1 reference video for 11s to 15s clips):

bash
uv run scripts/omni.py \
  --vertexai \
  --input "./assets/art/ink_painting_style.png" \
  --input "./assets/characters/hero_front.png" \
  --input "./assets/characters/hero_side.png" \
  --task "reference_to_video" \
  --resolution "1080p" \
  --duration "12s" \
  --prompt "Use the first image as the ink-wash painting style reference, and use the second and third images as character references for our hero. Do not use the images as literal starting frames. The hero walks across a misty wooden mountain bridge at dawn with bamboo flute music and rushing river sounds." \
  --output "./assets/video/bridge_cutscene.mp4"

4. Multi-Turn Conversational Editing & Video Extension (edit & extend)

Store the initial interaction (--store) so you can pass its Interaction ID to --previous-interaction-id on follow-up turns, or pass an existing .mp4 file directly via --input:

bash
# Turn 1: Generate initial 10s video and store interaction state
uv run scripts/omni.py \
  --vertexai \
  --store \
  --resolution "720p" \
  --duration "10s" \
  --prompt "A violinist performing outdoors in an autumn park, expressive solo violin melody." \
  --output "./assets/video/violin_v1.mp4"

# Turn 2: Edit the video conversationally while locking unmentioned details
uv run scripts/omni.py \
  --vertexai \
  --store \
  --previous-interaction-id "$TURN1_ID" \
  --task "edit" \
  --duration "10s" \
  --prompt "Change the autumn trees to blooming cherry blossoms in spring. Keep everything else the same." \
  --output "./assets/video/violin_spring.mp4"

# Turn 3: Extend the video by 10 seconds (3s to 10s per extension turn)
uv run scripts/omni.py \
  --vertexai \
  --previous-interaction-id "$TURN2_ID" \
  --task "extend" \
  --duration "10s" \
  --prompt "Extend this video: the camera pans up to reveal a stone pavilion as the violin melody builds into a warm orchestral finale." \
  --output "./assets/video/violin_extended.mp4"

5. Standalone Video Upscaling (--task upscale)

gemini-omni-1.2-flash supports standalone video upscaling (360p -> 720p or 1080p; 720p -> 1080p or 4k) for clips up to 15s at 24 FPS with zero text input token cost (total_input_tokens: 0):

bash
# Iterate quickly at 360p or 720p, then upscale the approved clip to 1080p or 4K
uv run scripts/omni.py \
  --vertexai \
  --input "./assets/video/violin_spring.mp4" \
  --task "upscale" \
  --resolution "4k" \
  --delivery "uri" \
  --output "./assets/video/violin_spring_4k.mp4"

6. Offline Validation (--dry-run)

Validate model aliases, durations, media counts, and inspect the exact Interactions API JSON payload without making network calls:

bash
uv run scripts/omni.py \
  --model "gemini-omni-1.2-flash" \
  --resolution "1080p" \
  --duration "15s" \
  --seed 7 \
  --prompt "Pixel-art starship launching from an orbital dock with retro thruster roar." \
  --output "launch.mp4" \
  --dry-run

Pre-Processing & Audio Handling (ffmpeg)

  1. Preserve vs. Regenerate Video Audio (ffmpeg -an):
    • By default, Gemini Omni 1.2 Flash preserves the original audio of an input video during edits unless you explicitly prompt for audio changes.
    • To force the model to synthesize a brand-new audio track from scratch matching your visual edits, strip the audio stream before passing --input:
      bash
      ffmpeg -y -i source.mp4 -c:v copy -an source_silent.mp4
      uv run scripts/omni.py \
        --vertexai \
        --input "source_silent.mp4" \
        --task "edit" \
        --prompt "Transform the daytime street into a rainy cyberpunk night with neon reflections, heavy rain sound effects, distant thunder, and synth ambient music. Keep everything else the same." \
        --output "cyberpunk_edit.mp4"
  2. Extract Synchronized Cutscene Audio for Ebitengine (--extract-audio):
    • When using a generated video cutscene in an Ebitengine 2D game, pass --extract-audio ./assets/audio/cutscene.wav to extract a 44,100 Hz 16-bit stereo PCM .wav file aligned to Ebitengine's 4-byte stereo sample frames.

Prompting Best Practices

  1. Describe Media Roles in Natural Language: Clearly state which input image is the starting frame, ending frame, character reference, or style reference ("Use the first image as the starting frame"), and avoid deprecated <FIRST_FRAME> or <IMAGE_REF_0> tags.
  2. Direct Synchronized Audio Explicitly: Specify background music genre, ambient soundscapes, and exact quoted dialogue ("She says in a calm voice: 'All relays are online.'" or "No dialogue, only ambient wind and footsteps").
  3. Use Timecodes for Multi-Shot Sequences: Structure 10s to 15s clips with bracketed timestamps ([0-5s] Wide establishing shot... [5-10s] Cut to medium close-up... [10-15s] Slow pull-back...).
  4. Surgical Video Edits: When editing an existing video, end your prompt with "Keep everything else the same" to lock background geometry, lighting, and unmentioned subjects.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Gemini Omni AI 技能有什么作用?

使用 Gemini Omni 1.2 Flash(gemini-omni-1.2-flash)和 Gemini Omni 1.1 Flash(gemini-omni-1.1-flash),通过 uv run scripts/omni.py 和 Google Gen AI SDK(Interactions API)生成对话式视频、编辑多模态视频、插补首尾帧、扩展视频,并在原生同步音频的支持下单独提升视频分辨率。支持 Vertex AI / Gemini Enterprise(Application Default Credentials)、时长为 3s 至 15s、分辨率为 360p 至 4K(24 FPS)的视频片段、最多 6-10 张参考图像和 3 个参考视频,以及 2D 游戏过场动画集成。在生成游戏过场动画、标题动画、宣传视频,或编辑和扩展视频片段时启用。

为什么在 TypingMind 中使用 Gemini Omni?

因为您只需安装一次,就能搭配任何模型使用。Gemini Omni 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Gemini Omni?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/danicat/skills/tree/main/media/gemini-omni。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Gemini Omni?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Gemini Omni 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Gemini Omni 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Gemini Omni AI 技能免费吗?

是的。danicat 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇