npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ai-rpg-engine/audio-director

v2.0.8

Published

Audio cue scheduling, priority, ducking, and cooldown engine for AI RPG Engine

Downloads

310

Readme

@ai-rpg-engine/audio-director

用于AI RPG Engine的确定性音频提示调度引擎。

它是Immersion Runtime的一部分,用于将叙述计划转换为定时、优先级的音频指令。

安装

npm install @ai-rpg-engine/audio-director

功能

Audio Director 接收一个NarrationPlan,并生成有序的AudioCommand[],这些指令可以由任何音频后端执行。它负责:

  • 优先级: 语音 > 音效 > 音乐 > 环境音 (可配置)
  • 音量降低: 当语音播放时,环境音/音乐会自动降低音量
  • 冷却时间: 防止音效过度播放 (每个资源可配置)
  • 时间同步: 将提示与语音时长相关联
  • 分层跟踪: 了解哪些环境音层处于活动状态

用法

import { AudioDirector } from '@ai-rpg-engine/audio-director';
import type { NarrationPlan } from '@ai-rpg-engine/presentation';

const director = new AudioDirector({
  defaultCooldownMs: 2000,
});

// Schedule commands from a narration plan
const commands = director.schedule(plan);

// Execute commands through your audio backend
for (const cmd of commands) {
  await audioBackend.execute(cmd);
}

// Check cooldowns
director.isOnCooldown('alert_warning'); // true if recently played

// Clear cooldowns on scene change
director.clearCooldowns();

默认音量降低规则

| 触发器 | 目标 | 降低音量 | |---------|--------|-----------| | 语音 | 环境音 | 30% 音量 | | 语音 | 音乐 | 40% 音量 | | 音效 | 环境音 | 60% 音量 |

AI RPG Engine 的一部分

此软件包是 AI RPG Engine 单一代码仓库的一部分。请参阅根目录下的 README 文件以获取完整的架构信息。

许可证

MIT