Claude 174e31b3fc feat(ja-JP): add skill sub-reference translations (angular, remotion, etc.)
Translated 85 skill sub-reference files to achieve full parity with
the English source:

- skills/angular-developer/references/ — 35 files (all references)
- skills/remotion-video-creation/rules/ — 28 files (all rules)
- skills/tinystruct-patterns/references/ — 5 files
- skills/openclaw-persona-forge/references/ — 6 files
- skills/skill-comply/prompts/ — 3 files
- skills/lead-intelligence/agents/ — 4 files
- skills/brand-voice/references/ — 1 file
- skills/frontend-slides/ — 2 files
- hooks/memory-persistence/README.md — 1 file

English source parity: 0 missing files (excluding rules/zh/, internal
docs, and experimental examples absent from zh-CN)
2026-05-18 06:15:26 +09:00

59 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: get-audio-duration
description: Mediabunnyを使用してオーディオファイルのデュレーションを秒単位で取得する
metadata:
tags: duration, audio, length, time, seconds, mp3, wav
---
# MediabunnyによるオーディオDurationの取得
Mediabunnyはオーディオファイルのデュレーションを抽出できます。ブラウザ、Node.js、Bun環境で動作します。
## オーディオDurationの取得
```tsx
import { Input, ALL_FORMATS, UrlSource } from "mediabunny";
export const getAudioDuration = async (src: string) => {
const input = new Input({
formats: ALL_FORMATS,
source: new UrlSource(src, {
getRetryDelay: () => null,
}),
});
const durationInSeconds = await input.computeDuration();
return durationInSeconds;
};
```
## 使用方法
```tsx
const duration = await getAudioDuration("https://remotion.media/audio.mp3");
console.log(duration); // 例: 180.5 (秒)
```
## ローカルファイルとの使用
ローカルファイルの場合は、`UrlSource` の代わりに `FileSource` を使用します:
```tsx
import { Input, ALL_FORMATS, FileSource } from "mediabunny";
const input = new Input({
formats: ALL_FORMATS,
source: new FileSource(file), // 入力またはドラッグドロップからのFileオブジェクト
});
const durationInSeconds = await input.computeDuration();
```
## RemotionのstaticFileとの使用
```tsx
import { staticFile } from "remotion";
const duration = await getAudioDuration(staticFile("audio.mp3"));
```