Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
## Install

```sh
npm install @enumura1/glyphflow
npm install @enumura/glyphflow
```

```ts
import { createKaraokeNarrator } from "@enumura1/glyphflow";
import "@enumura1/glyphflow/styles.css";
import { createKaraokeNarrator } from "@enumura/glyphflow";
import "@enumura/glyphflow/styles.css";

const narrator = createKaraokeNarrator({
text: "This is a karaoke caption.",
Expand Down
2 changes: 1 addition & 1 deletion docs-site/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Returns an object with `speak()`, `pause()`, `resume()`, `cancel()`, `getDiagnos

## Styling

Import `@enumura1/glyphflow/styles.css`. Override `--kn-highlight-color`, `--kn-unhighlight-color`, font, size, and spacing in application CSS.
Import `@enumura/glyphflow/styles.css`. Override `--kn-highlight-color`, `--kn-unhighlight-color`, font, size, and spacing in application CSS.
8 changes: 4 additions & 4 deletions docs-site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ title: Getting started
## Install

```sh
npm install @enumura1/glyphflow
npm install @enumura/glyphflow
```

Import the API and stylesheet from your application entry point.

```ts
import { createKaraokeNarrator, getSpeechSynthesisSupport } from "@enumura1/glyphflow";
import "@enumura1/glyphflow/styles.css";
import { createKaraokeNarrator, getSpeechSynthesisSupport } from "@enumura/glyphflow";
import "@enumura/glyphflow/styles.css";
```

## Create a caption target
Expand Down Expand Up @@ -61,7 +61,7 @@ Calling `speak()` again cancels the active session and starts a fresh one. Call
The browser may load its voice list asynchronously. `getVoices()` therefore returns an empty array until voices are ready. Refresh your own UI when the browser dispatches `voiceschanged`.

```ts
import { getVoices } from "@enumura1/glyphflow";
import { getVoices } from "@enumura/glyphflow";

function refreshVoices() {
const englishVoices = getVoices().filter((voice) => voice.lang.startsWith("en"));
Expand Down
6 changes: 3 additions & 3 deletions docs-site/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ Word-boundary events provide observed timings. Between boundaries, GlyphFlow pre
## Quick start

```sh
npm install @enumura1/glyphflow
npm install @enumura/glyphflow
```

```ts
import { createKaraokeNarrator } from "@enumura1/glyphflow";
import "@enumura1/glyphflow/styles.css";
import { createKaraokeNarrator } from "@enumura/glyphflow";
import "@enumura/glyphflow/styles.css";

const narrator = createKaraokeNarrator({
text: "This is a caption.",
Expand Down
2 changes: 1 addition & 1 deletion docs-site/docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The browser may support Web Speech but the selected voice may not emit usable `w

## I hear speech but the caption does not move

Confirm that you imported `@enumura1/glyphflow/styles.css` and that the selected voice emits word boundaries. The `unsupported` state after speech ends identifies a boundary-free voice.
Confirm that you imported `@enumura/glyphflow/styles.css` and that the selected voice emits word boundaries. The `unsupported` state after speech ends identifies a boundary-free voice.

## Speech does not start

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ title: API

## スタイル

`@enumura1/glyphflow/styles.css`をimportしてください。`--kn-highlight-color`、`--kn-unhighlight-color`、フォント、サイズ、余白はアプリケーション側で上書きできます。
`@enumura/glyphflow/styles.css`をimportしてください。`--kn-highlight-color`、`--kn-unhighlight-color`、フォント、サイズ、余白はアプリケーション側で上書きできます。
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ title: 使い始める
## インストール

```sh
npm install @enumura1/glyphflow
npm install @enumura/glyphflow
```

アプリケーションのエントリーポイントからAPIとstylesheetをimportします。

```ts
import { createKaraokeNarrator, getSpeechSynthesisSupport } from "@enumura1/glyphflow";
import "@enumura1/glyphflow/styles.css";
import { createKaraokeNarrator, getSpeechSynthesisSupport } from "@enumura/glyphflow";
import "@enumura/glyphflow/styles.css";
```

## 字幕の描画先を用意する
Expand Down Expand Up @@ -61,7 +61,7 @@ narrator.speak();
ブラウザがvoice一覧を非同期で準備することがあります。そのため`getVoices()`は準備前には空配列を返します。`voiceschanged`イベントでUIを更新してください。

```ts
import { getVoices } from "@enumura1/glyphflow";
import { getVoices } from "@enumura/glyphflow";

function refreshVoices() {
const englishVoices = getVoices().filter((voice) => voice.lang.startsWith("en"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ GlyphFlowは、Web Speech APIで文章を読み上げながら、読み上げ中
## クイックスタート

```sh
npm install @enumura1/glyphflow
npm install @enumura/glyphflow
```

```ts
import { createKaraokeNarrator } from "@enumura1/glyphflow";
import "@enumura1/glyphflow/styles.css";
import { createKaraokeNarrator } from "@enumura/glyphflow";
import "@enumura/glyphflow/styles.css";

const narrator = createKaraokeNarrator({
text: "This is a caption.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Web Speech APIに対応していても、選択したvoiceが利用可能な単

## 音声は聞こえるが字幕が動かない

`@enumura1/glyphflow/styles.css`をimportしたか、選択したvoiceが単語境界を返すかを確認してください。音声終了後に`unsupported`になる場合は境界がないvoiceです。
`@enumura/glyphflow/styles.css`をimportしたか、選択したvoiceが単語境界を返すかを確認してください。音声終了後に`unsupported`になる場合は境界がないvoiceです。

## 音声が開始されない

Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function Home(): JSX.Element {
</a>
</div>
<pre className={styles.install}>
<code>npm install @enumura1/glyphflow</code>
<code>npm install @enumura/glyphflow</code>
</pre>
</div>

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@enumura1/glyphflow",
"name": "@enumura/glyphflow",
"version": "1.0.0",
"description": "Browser Web Speech narration with smoothly wiping inside-glyph captions.",
"keywords": [
Expand Down
Loading