> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# 設定參考 - VOICEVOX for Laravel

> 說明 config/voicevox.php 的所有設定項目、環境變數、預設值與設定範例。

本頁整理 `config/voicevox.php` 的所有設定項目。

## 發佈設定檔

```shell theme={null}
php artisan vendor:publish --tag="voicevox-config"
```

## `client` 設定

### `client.url`

* Type: `string`
* Default: `'http://127.0.0.1:50021'`
* Env: `VOICEVOX_URL`

```php theme={null}
'client' => [
    'url' => env('VOICEVOX_URL', 'http://127.0.0.1:50021'),
],
```

```dotenv theme={null}
VOICEVOX_URL=http://127.0.0.1:50021
```

### `client.core_version`

* Type: `string|null`
* Default: `null`
* Env: `VOICEVOX_CLIENT_CORE_VERSION`

```php theme={null}
'client' => [
    'core_version' => env('VOICEVOX_CLIENT_CORE_VERSION'),
],
```

```dotenv theme={null}
VOICEVOX_CLIENT_CORE_VERSION=0.15.0
```

## `core` 設定

### `core.path`

* Type: `string|null`
* Default: `null`
* Env: `VOICEVOX_CORE_PATH`
* Required: Native 模式 / Engine API 模式

```php theme={null}
'core' => [
    'path' => env('VOICEVOX_CORE_PATH'),
],
```

```dotenv theme={null}
# macOS
VOICEVOX_CORE_PATH=/Users/username/.local/voicevox_core/

# Linux
VOICEVOX_CORE_PATH=/home/username/.local/voicevox_core/

# Windows
VOICEVOX_CORE_PATH=C:\Users\username\.local\voicevox_core\
```

### `core.dict`

* Type: `string`
* Default: `'dict/open_jtalk_dic_utf_8-1.11'`
* Env: `VOICEVOX_CORE_DICT_PATH`

```php theme={null}
'core' => [
    'dict' => env('VOICEVOX_CORE_DICT_PATH', 'dict/open_jtalk_dic_utf_8-1.11'),
],
```

### `core.models`

* Type: `string`
* Default: `'models/vvms'`
* Env: `VOICEVOX_CORE_MODELS_PATH`

```php theme={null}
'core' => [
    'models' => env('VOICEVOX_CORE_MODELS_PATH', 'models/vvms'),
],
```

### `core.user_dict`

* Type: `string`
* Default: `storage_path('voicevox/user_dict.json')`
* Env: `VOICEVOX_CORE_USER_DICT_PATH`

```php theme={null}
'core' => [
    'user_dict' => env('VOICEVOX_CORE_USER_DICT_PATH', storage_path('voicevox/user_dict.json')),
],
```

```dotenv theme={null}
VOICEVOX_CORE_USER_DICT_PATH=/path/to/custom/user_dict.json
```

相關頁面: [使用者字典](/zh-TW/packages/laravel-voicevox/native-user-dict)

### `core.presets`

* Type: `string`
* Default: `storage_path('voicevox/presets.json')`
* Env: `VOICEVOX_CORE_PRESETS_PATH`

```php theme={null}
'core' => [
    'presets' => env('VOICEVOX_CORE_PRESETS_PATH', storage_path('voicevox/presets.json')),
],
```

```dotenv theme={null}
VOICEVOX_CORE_PRESETS_PATH=/path/to/custom/presets.json
```

相關頁面: [預設集](/zh-TW/packages/laravel-voicevox/native-presets)

### `core.vvms`

* Type: `array`
* Default: `['0.vvm', '9.vvm', 's0.vvm']`
* Env: 無

```php theme={null}
# 預設(快速啟動)
'core' => [
    'vvms' => ['0.vvm', '9.vvm', 's0.vvm'],
],

# 載入所有模型(啟動變慢)
'core' => [
    'vvms' => [],
],
```

## `engine` 設定

### `engine.disabled`

* Type: `bool`
* Default: `false`
* Env: `VOICEVOX_ENGINE_DISABLED`

```php theme={null}
'engine' => [
    'disabled' => env('VOICEVOX_ENGINE_DISABLED', false),
],
```

```dotenv theme={null}
VOICEVOX_ENGINE_DISABLED=true
```

### `engine.fallback_url`

* Type: `string`
* Default: `'http://127.0.0.1:50021'`
* Env: `VOICEVOX_ENGINE_FALLBACK_URL`

```php theme={null}
'engine' => [
    'fallback_url' => env('VOICEVOX_ENGINE_FALLBACK_URL', 'http://127.0.0.1:50021'),
],
```

```dotenv theme={null}
VOICEVOX_ENGINE_FALLBACK_URL=http://127.0.0.1:50021
```

### `engine.fallback_error`

* Type: `string`
* Default: `'The Laravel version of the engine does not support this endpoint. Please use the official engine instead.'`
* Env: 無

```php theme={null}
'engine' => [
    'fallback_error' => 'The Laravel version of the engine does not support this endpoint. Please use the official engine instead.',
],
```

<Tip>
  建議先設定 `client.url` 與 `core.path`,需要時再調整 `core.user_dict` 或 `core.presets`,較好維運。
</Tip>


## Related topics

- [安裝與設定 - VOICEVOX for Laravel](/zh-TW/packages/laravel-voicevox/installation.md)
- [入門 - VOICEVOX for Laravel](/zh-TW/packages/laravel-voicevox/getting-started.md)
- [Laravel MCP](/zh-TW/mcp.md)
- [API 參考 - VOICEVOX Core for PHP](/zh-TW/packages/voicevox-core-php/api.md)
- [VOICEVOX for Laravel](/zh-TW/packages/laravel-voicevox/index.md)
