semvec/pypi-packages huggingface dataset:
ministudio 0.1.1
Model-Agnostic AI Video Generation Framework
Requires Python: >=3.8

# MiniStudio: The Cinematic AI Engine 🎬✨

**Programmable, Stateful, and Model-Agnostic Orchestration for High-Fidelity Video Production.**

MiniStudio transforms the chaotic world of generative AI into a structured filmmaking pipeline. It solves the "Consistency Problem" by treating video like code—enforcing character identity, environment stability, and temporal continuity through a state-machine driven architecture.

---

## 🎬 See it in Action

The "Why" behind this project and the high-fidelity results (Ghibli 2.0, The Last Algorithm) are documented in detail on my personal site:

### **👉 [Read the Full Article: Programmable Cinematography](https://www.hersi.dev/blog/ministudio)**

---

## 🛠️ The Architecture: How it Works

MiniStudio uses a three-layer stack to ensure your characters don't "drift" between shots.

1.  **Identity Grounding 2.0**: We use "Master Reference" portraits (Visual Anchors) that are injected into every injection step, ensuring **Emma** looks like **Emma** in Shot 1 and Shot 60.
2.  **The Invisible Weave**: A state-machine that "remembers" the environment geometry. If you move the camera 45 degrees, the engine knows what *should* be there.
3.  **Sequential Memory**: Each generation is grounded by the final frames of the previous shot, creating a perfect temporal link.

---

## 🚀 Quick Start

### 1. Installation
```bash
pip install -e .
```

### 2. Configure Credentials
MiniStudio supports **Vertex AI (Veo 3.1)** and **Google TTS**. 

#### Using Doppler (Recommended)
[Doppler](https://www.doppler.com/) is a multi-platform secret manager. If you use it, you can run:
```bash
doppler run -- python examples/contextbytes_brand_story.py
```

#### Using .env or Environment Variables
If you don't use Doppler, simply create a `.env` file or export your variables directly:
```bash
export GOOGLE_API_KEY="your-key-here"
# or
export GOOGLE_APPLICATION_CREDENTIALS="path/to/key.json"
```

### 3. Your First Shot
```python
from ministudio import VideoOrchestrator, VertexAIProvider

# Initialize the Director
orchestrator = VideoOrchestrator(VertexAIProvider())

# Define a Shot
shot = ShotConfig(
    action="A lone researcher discovers a glowing orb.",
    characters={"Emma": EMMA_STRICT_ID},
    duration_seconds=8
)

# Produce
await orchestrator.generate_shot(shot)
```

---

## ⚠️ Challenges & Roadmap (AI Filmmaking 2.0)

We are currently pushing the boundaries of what is possible. Current research areas included in our **[Production Journal](PRODUCTION_JOURNAL.md)**:
- **Audio-Sync Lag**: Refining the waveform orchestrator to eliminate the 0.5s voice/video drift.
- **Environment Shimmer**: Implementing 2-pass background locking.
- **Character Masks**: Forcing the AI to paint "over" a locked environment plate.

---

## 🤝 Contributing & Community
MiniStudio is built by the community for the community. See **[ROADMAP.md](ROADMAP.md)** for our upcoming features.

**Made with ❤️ for the future of cinema.**
nsqdriver 0.0.310
Q series measurement and control equipment driver interface
Requires Python: >=3.8

```
  _   _   ____     ___    ____           _                       
 | \ | | / ___|   / _ \  |  _ \   _ __  (_) __   __   ___   _ __ 
 |  \| | \___ \  | | | | | | | | | '__| | | \ \ / /  / _ \ | '__|
 | |\  |  ___) | | |_| | | |_| | | |    | |  \ V /  |  __/ | |   
 |_| \_| |____/   \__\_\ |____/  |_|    |_|   \_/    \___| |_|   
```
***

### 简介
NSQDriver为一套测控系列设备的Python通用驱动接口。可使用Python作为编程语言，基于此驱动接口可以实现对测控设备的控制，进而完成各种超导量子芯片的表征实验和高保真门操作。

```
                              +------------------------+
                              |          Python        |
                              |     +------------------+
                              |     |      NSQDriver   |
                              +------------------------+
                                     :     :         :
                           +----------     :         -----+
                           :               :              :
                           V               V              V
                     +-----------+   +-----------+   +-----------+   
                     |  Device A |   |  Device B |   |   QSYNC   |    
                     +-----------+   +-----------+   +-----------+   
```

NSQDriver接口可用于统一控制Q100/PQ系列测控仪器，可详细控制每台仪器每个OUT、IN通道的播放与采集行为，以及查看设备的运行状态等。在一个多台测控设备组成的多比特测控系统中，可以有效的在软件层面实现对系统中每台设备的详细控制。

***
### 快速开始
- 驱动接口的通用流程如下
```python
from nsqdriver import MCIDriver, QSYNCDriver

# 实例化设备驱动接口
driver = MCIDriver('127.0.0.1')
qsync = QSYNCDriver('127.0.0.1')

# 连接设备
qsync.open()
driver.open()

# 初始化系统
qsync.sync_system()


# 相关参数，参数细节相关参考 8.可用参数列表
driver.set('Shot', 1024)
```

- NSWave语言
  - NSWave是一种对于Sequence序列发生技术的配套编程语言，属于python语法的子集，支持与python程序进行混编
  - Sequence序列发生模式将测控所需的各种门的编辑由主控计算机直接生成波形转化成了设备实时计算
  - 提供了一套直观的时序编辑接口
```python
from nsqdriver import nswave as nw
from nsqdriver import MCIDriver
import numpy as np

@nw.kernel
def program(envelope: np.ndarray):
    srate: nw.Var = 8e9
    time_width: nw.Var = 6e-6
    freq: nw.Var = 4.1e9
    time_line: np.ndarray = np.linspace(0, 6e-6, int(time_width * srate + 1))
    wave: np.ndarray = np.cos(2 * np.pi * time_line * freq)
    frame_0: nw.Frame = nw.ins_frame(0e9, 0*np.pi)
    frame_1: nw.Frame = nw.ins_frame(4.3e9, 0*np.pi)
    envelope_0: nw.Envelope = nw.ins_envelope(wave)
    envelope_1: "nw.Envelope" = nw.evlp_gaussian(2e-6, srate)
    envelope_2: nw.Envelope = nw.ins_envelope(envelope)

    nw.wait_for_trigger()
    nw.reset_frame([frame_0, frame_1])
    nw.wait(3.2e-6)
    nw.play_wave(envelope_1, frame_1)
    nw.play_wave(envelope_0, frame_0)
    nw.inc_phase(frame_1, np.pi)
    nw.play_wave(envelope_2, frame_1)

    return nw.Kernel()

driver: MCIDriver
envelope = np.ones((10240, ))
driver.set("Program", program(envelope), 'S5-O1')
```