# v0.5.0 Release Notes

> v0.4.3 -> v0.5.0

## Summary

Consolidates every platform adapter under a single `core/` tree, changing all import paths. Voice sending drops its built-in text-to-speech dependency and now uploads an audio file the caller already produced. Documentation and licensing are refreshed alongside.

<details>
<summary>翻譯</summary>

將全部平台 adapter 整合進單一 `core/` 目錄樹，所有 import path 隨之變更。語音發送移除內建文字轉語音相依，改為上傳呼叫端已備妥的音訊檔。文件與授權同步更新。

</details>

## ⚠️ Breaking Changes

### Platform packages moved under `core/`

**Before:**

```go
import (
    "github.com/pardnchiu/go-bot/telegram"
    "github.com/pardnchiu/go-bot/discord"
    "github.com/pardnchiu/go-bot/line"
)
```

**After:**

```go
import (
    "github.com/pardnchiu/go-bot/core/telegram"
    "github.com/pardnchiu/go-bot/core/discord"
    "github.com/pardnchiu/go-bot/core/line"
)
```

**Migration:**

```
go get github.com/pardnchiu/go-bot@v0.5.0
# then prefix every platform import with core/
```

<details>
<summary>翻譯</summary>

平台套件的 import path 全部改掛 `core/` 前綴，需同步更新既有引用。

</details>

### `tts` package removed; `SendVoice` takes a file path

**Before:**

```go
telegram.SendVoice(ctx, chatID, text, apiKey)
discord.SendVoice(ctx, channelID, replyTo, text, apiKey)
```

**After:**

```go
telegram.SendVoice(ctx, chatID, "./voice.ogg")
discord.SendVoice(ctx, channelID, replyTo, "./voice.ogg")
```

**Migration:**

```go
// Produce the OGG/OPUS file with your own synthesizer, then upload it.
path := synthesize(ctx, text)
bot.SendVoice(ctx, chatID, path)
```

The trailing `caption ...string` parameter silently absorbs the old `apiKey`
argument, so unmigrated call sites still compile while uploading the prompt text
as a file path. Audit every `SendVoice` call by hand rather than relying on the
compiler.

<details>
<summary>翻譯</summary>

`tts` 套件已移除，`SendVoice` 改為接受既有音訊檔路徑；文字轉語音由呼叫端自行完成。
注意尾端 `caption ...string` 會吞掉舊的 `apiKey` 參數，未遷移的呼叫點仍可編譯但語意錯誤，需逐處人工檢查。

</details>

## Changes

### BREAKING

- Relocate Telegram, Discord, and LINE packages under `core/` (@pardnchiu) [52eadee]
- Remove the `tts` package and reduce `SendVoice` to a file-path upload (@pardnchiu) [52eadee, 5489b26]

<details>
<summary>翻譯</summary>

- 將 Telegram、Discord、LINE 套件移至 `core/`
- 移除 `tts` 套件，`SendVoice` 簡化為檔案路徑上傳

</details>

### ADD

- Add MIT license (@pardnchiu) [a9e88eb]

<details>
<summary>翻譯</summary>

- 新增 MIT license

</details>

### DOC

- Regenerate bilingual documentation and realign it with the text-to-speech-free API surface (@pardnchiu) [52eadee, a9e88eb, 2554f38, 91b6486]

<details>
<summary>翻譯</summary>

- 重新生成雙語文件，並對齊移除文字轉語音後的 API 介面

</details>

## Scope

- `core/telegram/`, `core/discord/`, `core/line/` — BREAKING
- `core/tts/` — BREAKING, REMOVE
- `doc/` — DOC
- `README.md`, `LICENSE` — DOC, ADD
- `.gitignore` — CHORE

---

Generated by [SKILL](https://github.com/pardnchiu/skill-version-generate)
