@markusylisiurunen/tau 0.3.73 → 0.3.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/cli.js +1 -0
- package/dist/core/cli.js.map +1 -1
- package/dist/core/config/schema.js +8 -0
- package/dist/core/config/schema.js.map +1 -1
- package/dist/core/personas.js +4 -3
- package/dist/core/personas.js.map +1 -1
- package/dist/core/static/tau_docs/client-tools.md +1 -1
- package/dist/core/static/tau_docs/credentials.md +8 -5
- package/dist/core/static/tau_docs/image-generation.md +132 -0
- package/dist/core/static/tau_docs/index.md +6 -0
- package/dist/core/static/tau_docs/manifest.json +3 -0
- package/dist/core/static/tau_docs/pdf-unpacking.md +38 -0
- package/dist/core/static/tau_docs/personas.md +1 -1
- package/dist/core/static/tau_docs/security.md +1 -1
- package/dist/core/static/tau_docs/speech-generation.md +181 -0
- package/dist/core/static/tau_docs/telegram.md +6 -12
- package/dist/core/static/tau_docs/tools.md +24 -23
- package/dist/core/telegram/adapter.js +138 -302
- package/dist/core/telegram/adapter.js.map +1 -1
- package/dist/core/telegram/attachments.js +78 -0
- package/dist/core/telegram/attachments.js.map +1 -0
- package/dist/core/telegram/runtime.js +2 -2
- package/dist/core/telegram/runtime.js.map +1 -1
- package/dist/core/telegram/{send_image.js → send_file.js} +52 -31
- package/dist/core/telegram/send_file.js.map +1 -0
- package/dist/core/telegram/session_manager.js +12 -0
- package/dist/core/telegram/session_manager.js.map +1 -1
- package/dist/core/tool/cli.js +22 -2
- package/dist/core/tool/cli.js.map +1 -1
- package/dist/core/tool/image_generate.js +320 -0
- package/dist/core/tool/image_generate.js.map +1 -0
- package/dist/core/tool/media.js +71 -0
- package/dist/core/tool/media.js.map +1 -0
- package/dist/core/tool/pdf_unpack.js +3 -1
- package/dist/core/tool/pdf_unpack.js.map +1 -1
- package/dist/core/tool/speech_generate.js +269 -0
- package/dist/core/tool/speech_generate.js.map +1 -0
- package/dist/core/tools/tau_docs.js +25 -8
- package/dist/core/tools/tau_docs.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-html-Bz4AeRpU.js → angular-html-BjHlbeCk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{angular-ts-DtR-9mR2.js → angular-ts-5J5hsUV-.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{apl-BQ43WeiF.js → apl-ChIs51_N.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{astro-DgVTgTDV.js → astro-RtGdbaIT.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{blade-Cw07CpIp.js → blade-Cuc0ZzS1.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{c-cVuArWdv.js → c-IpjS3QEt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{chapel-J_c7UtHw.js → chapel-BvHOmF40.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cobol-DeNy12Rc.js → cobol-BWLkapNx.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{coffee-BuJNQF73.js → coffee-lfdf_MuK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{cpp-D5UWZzvw.js → cpp-GvMfdutG.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{crystal-DlyigmxA.js → crystal--kdmUeXB.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{css-B3tDaq6J.js → css-CnlOazId.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{edge-Cl-zwjoo.js → edge-CwnxQiFe.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elixir-Cu1MwzIx.js → elixir-BVO19qQd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{elm-ChJX3Fht.js → elm-BK3istEo.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{erb-C633539y.js → erb-CO4uKwKD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{git-rebase-dSyEL3XE.js → git-rebase-CDrrgbGV.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-js-DdEjEvle.js → glimmer-js-7CFSyo6c.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glimmer-ts-gxlkJwxf.js → glimmer-ts-Ofllf2Yo.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{glsl-BwcrXep1.js → glsl-K_36bq1K.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{graphql-B5ZrSlf6.js → graphql-BMZnssUN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hack-Dv0Ydnfo.js → hack-MG_t8QNs.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{haml-Bg7LdFxh.js → haml-0hDK-uCt.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{handlebars-glMo_Z8K.js → handlebars-D4_MRJPB.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-CwqxfM5g.js → html-BCi--7qp.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{html-derivative-CNBhWOif.js → html-derivative-DYq2AWiD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{http-CyujTI3m.js → http-BmLFm2Pm.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{hurl-Cl3SfLcy.js → hurl-CT71cK69.js} +1 -1
- package/dist/diff_tool/app/dist/assets/index-DyaXBald.js +340 -0
- package/dist/diff_tool/app/dist/assets/{java-yAJ9r-ng.js → java-Bm2FCq-d.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{javascript-CNo473Bi.js → javascript-C7oEny21.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jinja-DYKv3KJJ.js → jinja-igQBS-SS.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jison-v7-Cvbl-.js → jison-BrOUp4rK.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{json-CcIOg31O.js → json-DsuR7Nai.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{jsx-DdUoAN3M.js → jsx-BdomFXcA.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{julia-CmrsECo7.js → julia-DqOG4pbM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{just-ChVqWJfZ.js → just-ZrSTuT0n.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{latex-CSr2MXti.js → latex-DbmtZIwN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{liquid-PqLruLAt.js → liquid-DKnUlRIp.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{lua-BgGBpNvf.js → lua-Cyq3f59a.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{marko-SFqsIi7s.js → marko-hmOsFPHQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{mdc-OMY7DRCd.js → mdc-BnnQmDC-.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nginx-B6OUK7I1.js → nginx-C0zLUSna.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{nim-8XR8rRwa.js → nim-Oljl3c5n.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{org-BMVlj0WE.js → org-Cp4CA-0c.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{perl-CZcZ1Wwq.js → perl-DstDVYmJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{php-XGIDda3K.js → php-Cc3bNZ7J.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{pug-BabDTZ9H.js → pug-B3xDUzl0.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{qml-Dh6hEeD6.js → qml-B9iDahKk.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{r-BMpJDcBE.js → r-B7M5ZSBC.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{razor-Bj3Isd7l.js → razor-BlfV6bjQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{regexp-zj7qgpKa.js → regexp-BVT0NBj6.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{rst-BbPHwnEt.js → rst-Cq-Mcher.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ruby-frABERx7.js → ruby-5uCK_s01.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sas-C8mu1Dyy.js → sas-m4dYluKN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{scss-BVco9vX5.js → scss-DFiJcBQH.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellscript-BTNlh7y9.js → shellscript-DCtSkJJQ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{shellsession-D7ey1BO-.js → shellsession-_DntbpLM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{soy-dQGGTG6M.js → soy-Dd1fWsG8.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{sql-DUAdkqaP.js → sql-Bygp5F-5.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{stata-BVWGYdTB.js → stata-CqIA1VQD.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{surrealql-DRMjeuPn.js → surrealql-C2-2C-z3.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{svelte-CvWRMjnM.js → svelte-CrTy7VSb.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{templ-mi-X_uNU.js → templ-B_h9AHFJ.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tex-hP63zYVU.js → tex-AwlGuBDG.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{ts-tags-FKkmztAd.js → ts-tags--oqU6stH.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{tsx-dsY2OUmA.js → tsx-Cx-oUPFA.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{twig-DNQYIm5Y.js → twig-DMQw3R9O.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typescript-Cw0J6v6b.js → typescript-BCtu9W7E.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{typst-DG4tB9ci.js → typst-jGrqJHSo.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-BCeYhEGU.js → vue-GFZcsvXd.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-html-BjK5VjUf.js → vue-html-DTMalvg7.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{vue-vine-C5nERcfG.js → vue-vine-BwDeqLrM.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xml-Bf7Ghb04.js → xml-CoXyuOzf.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{xsl-dx2g1C_f.js → xsl-BQFm34CN.js} +1 -1
- package/dist/diff_tool/app/dist/assets/{yaml-D_jBlzML.js → yaml-CbO2A_pF.js} +1 -1
- package/dist/diff_tool/app/dist/index.html +1 -1
- package/dist/history/worker/viewer.js +8 -8
- package/package.json +8 -8
- package/dist/core/telegram/send_image.js.map +0 -1
- package/dist/diff_tool/app/dist/assets/index-B6qzTNa4.js +0 -340
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Speech generation
|
|
2
|
+
|
|
3
|
+
`tau tool speech-generate` turns a caller-chunked script into one WAV using ElevenLabs Eleven v4 Turbo (`eleven_v4_turbo`) or Eleven v4 (`eleven_v4`). It supports single-speaker narration and multi-speaker dialogue.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
tau tool speech-generate --help
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Credentials and requirements
|
|
10
|
+
|
|
11
|
+
Requires an ElevenLabs API key. See [feature-specific credentials](credentials.md#feature-specific-keys) for setup.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
tau tool speech-generate --list-voices
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Voice listing prints one JSON object per voice, containing `voice_id` and `name`. Use those IDs in the script.
|
|
18
|
+
|
|
19
|
+
## Models
|
|
20
|
+
|
|
21
|
+
`--model` is required; the CLI has no implicit default. Use `eleven_v4_turbo` for lower-latency speech, as shown in the examples. Use `eleven_v4` when maximum quality matters more than latency. Both support narration and multi-speaker dialogue.
|
|
22
|
+
|
|
23
|
+
## Input and examples
|
|
24
|
+
|
|
25
|
+
Supply a UTF-8 JSON document with exactly `voices` and `chunks`. `voices` maps speaker names to voice IDs; `chunks` is an ordered, nonempty array of nonempty arrays of speaker turns. Each turn contains exactly `speaker` and nonblank `text`.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"voices": {
|
|
30
|
+
"host": "VOICE_ID_A",
|
|
31
|
+
"guest": "VOICE_ID_B"
|
|
32
|
+
},
|
|
33
|
+
"chunks": [
|
|
34
|
+
[
|
|
35
|
+
{
|
|
36
|
+
"speaker": "host",
|
|
37
|
+
"text": "[calm] Welcome. What are we exploring today?"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"speaker": "guest",
|
|
41
|
+
"text": "How a forest changes through the seasons."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
{ "speaker": "host", "text": "Let's begin with spring." },
|
|
46
|
+
{
|
|
47
|
+
"speaker": "guest",
|
|
48
|
+
"text": "The first changes happen before the leaves appear."
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Save as `dialogue.json`, replacing the placeholder voice IDs:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
tau tool speech-generate --model eleven_v4_turbo \
|
|
59
|
+
--input ./dialogue.json --output ./dialogue.wav
|
|
60
|
+
|
|
61
|
+
# Alternatively, use Eleven v4 for maximum quality.
|
|
62
|
+
tau tool speech-generate --model eleven_v4 \
|
|
63
|
+
--input ./dialogue.json --output ./dialogue-v4.wav
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Single-speaker narration uses the same shape with one voice. All chunks are validated before generation:
|
|
67
|
+
|
|
68
|
+
- Each chunk contains at most 2,000 Unicode code points across its text, including whitespace and delivery tags.
|
|
69
|
+
- Every speaker must resolve to a voice. At most 10 distinct voices may be used.
|
|
70
|
+
|
|
71
|
+
Tau packs consecutive whole chunks into requests of at most 2,000 characters, following the [dialogue endpoint's reliability recommendation](https://elevenlabs.io/docs/api-reference/text-to-dialogue/convert). The caller chooses chunk boundaries; text and turn order are preserved.
|
|
72
|
+
|
|
73
|
+
## Conversational assistant replies
|
|
74
|
+
|
|
75
|
+
For conversational assistant replies with Eleven v4 Turbo or Eleven v4, use `[Brisk but relaxed, speaking naturally to a colleague]` as a starting point. Put the tag at the beginning of the turn's `text`, followed by the words to speak. Tags guide delivery; they are not intended to be spoken aloud.
|
|
76
|
+
|
|
77
|
+
Choose a delivery that fits the content:
|
|
78
|
+
|
|
79
|
+
| Use case | Suggested tag |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| Everyday assistant reply | `[Brisk but relaxed, speaking naturally to a colleague]` |
|
|
82
|
+
| Faster update | `[Brisk but relaxed, slightly faster, brief natural pauses]` |
|
|
83
|
+
| Step-by-step explanation | `[Calm and clear, measured pace, brief pauses between steps]` |
|
|
84
|
+
| Story narration | `[Warm, expressive storytelling, unhurried pace]` |
|
|
85
|
+
| Quiet aside in dialogue | `[whispering]` |
|
|
86
|
+
|
|
87
|
+
These are custom prompting suggestions, not official named presets or guaranteed speed controls. Each speaker turn can use a different tag; place a tag before a phrase when the delivery should change within a turn.
|
|
88
|
+
|
|
89
|
+
ElevenLabs documents open-ended audio tags in its [v4 prompting guide](https://elevenlabs.io/docs/overview/capabilities/text-to-speech/best-practices#prompting-eleven-v4), also available as [plain Markdown](https://elevenlabs.io/docs/overview/capabilities/text-to-speech/best-practices.md#prompting-eleven-v4). Its [documentation index](https://elevenlabs.io/docs/llms.txt) lists other guides in an agent-friendly format.
|
|
90
|
+
|
|
91
|
+
Documented tags include `[curious]`, `[excited]`, `[sarcastic]`, `[whispering]`, `[laughs]`, `[sighs]`, and `[short pause]`. For example, a turn's `text` can contain:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
[curious] What happens if we try the other route?
|
|
95
|
+
|
|
96
|
+
[excited] That worked! [short pause] Here's what changed.
|
|
97
|
+
|
|
98
|
+
[Warm, conversational tone, faint amusement] You always did choose the longest way home.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Tags describe audible delivery or vocal actions, not visual actions such as smiling or standing. Clear descriptions reduce ambiguity between a delivery instruction and a sound effect. Results vary by voice and language; neither Eleven v4 Turbo nor Eleven v4 treats tags as deterministic controls.
|
|
102
|
+
|
|
103
|
+
Save this as `assistant-reply.json`, replacing `VOICE_ID` with an ID from `--list-voices`:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"voices": { "assistant": "VOICE_ID" },
|
|
108
|
+
"chunks": [
|
|
109
|
+
[
|
|
110
|
+
{
|
|
111
|
+
"speaker": "assistant",
|
|
112
|
+
"text": "[Brisk but relaxed, speaking naturally to a colleague] I found the issue. The app was using an old setting, so your changes never reached the server. I've fixed that and checked the result. You don't need to reinstall anything. Try saving once more. If the warning comes back, send me the exact message and I'll trace it from there."
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
tau tool speech-generate --model eleven_v4_turbo \
|
|
121
|
+
--input ./assistant-reply.json --output ./assistant-reply.wav
|
|
122
|
+
|
|
123
|
+
# Alternatively, use Eleven v4 for maximum quality.
|
|
124
|
+
tau tool speech-generate --model eleven_v4 \
|
|
125
|
+
--input ./assistant-reply.json --output ./assistant-reply-v4.wav
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
For a Finnish reply, replace the turn's `text` with:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
[Brisk but relaxed, speaking naturally to a colleague] Löysin ongelman. Sovellus käytti vanhaa asetusta, joten muutoksesi eivät päätyneet palvelimelle. Korjasin asetuksen ja tarkistin, että tallennus toimii. Sinun ei tarvitse asentaa mitään uudelleen. Kokeile tallentaa vielä kerran. Jos varoitus palaa, lähetä minulle sen tarkka teksti, niin selvitän syyn.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
To compare pacing, replace the leading tag with `[Brisk but relaxed, slightly faster, brief natural pauses]` and generate to a fresh output path, keeping the voice and spoken text fixed.
|
|
135
|
+
|
|
136
|
+
[Eleven v4 Turbo and Eleven v4](https://elevenlabs.io/docs/overview/capabilities/text-to-speech/eleven-v4) control delivery through audio tags rather than a numeric speed setting. Results vary by voice and language.
|
|
137
|
+
|
|
138
|
+
## Long recordings and assembly
|
|
139
|
+
|
|
140
|
+
Responses are streamed to disk as mono 24 kHz, signed 16-bit little-endian PCM. Batches are concatenated in order into one WAV. Approximately 30 minutes occupies 86.4 MB of PCM. Each batch is capped at 128 MiB and the assembled file must fit standard RIFF/WAV's roughly 4 GiB limit. Provider requests have a ten-minute deadline.
|
|
141
|
+
|
|
142
|
+
Each request receives up to three previous completed request IDs for ElevenLabs request stitching. A missing ID stops subsequent generation. Stitching uses normal ElevenLabs request logging.
|
|
143
|
+
|
|
144
|
+
## Outputs and recovery
|
|
145
|
+
|
|
146
|
+
The output parent directory must exist. Neither the requested WAV nor `<output>.parts` may exist. The `.parts` directory contains:
|
|
147
|
+
|
|
148
|
+
- `manifest.json`: model, PCM format, output path, request plan, text and voice IDs, one-based chunk indices, completion flags, and byte counts. `requestId` and `characterCost` retain the provider's `request-id` and `character-cost` headers, including when a subsequent audio download fails.
|
|
149
|
+
- `batch-0001.pcm`, etc.: completed raw PCM batches in request order.
|
|
150
|
+
- `.partial` files: interrupted downloads.
|
|
151
|
+
- `assembled.wav`: the assembled output.
|
|
152
|
+
|
|
153
|
+
Stdout on success is one JSON object with absolute `output`, `artifacts`, and the number of `batches`. The manifest contains the script text; keep artifacts private for sensitive scripts.
|
|
154
|
+
|
|
155
|
+
Failures exit nonzero and report the retained directory. Requests are not automatically retried because a failed request may already have incurred a charge.
|
|
156
|
+
|
|
157
|
+
To recover after a later batch fails, inspect the manifest's `completed` flags and chunk mapping. Generate only the unfinished chunks to a fresh output path, then assemble the completed PCM files from both runs in script order. Request stitching does not carry over between invocations.
|
|
158
|
+
|
|
159
|
+
For example, with FFmpeg installed:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
cat ./first.wav.parts/batch-0001.pcm \
|
|
163
|
+
./first.wav.parts/batch-0002.pcm \
|
|
164
|
+
./remaining.wav.parts/batch-0001.pcm > ./complete.pcm
|
|
165
|
+
ffmpeg -n -f s16le -ar 24000 -ac 1 -i ./complete.pcm -c:a pcm_s16le ./complete.wav
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use only completed `.pcm` batches, not `.partial` files.
|
|
169
|
+
|
|
170
|
+
## Approximate cost
|
|
171
|
+
|
|
172
|
+
Standard rates from the [ElevenLabs API pricing page](https://elevenlabs.io/pricing/api):
|
|
173
|
+
|
|
174
|
+
| Model | Per 1,000 characters | 2,000 characters | 27,000 characters (roughly 30 minutes) |
|
|
175
|
+
| --- | --- | --- | --- |
|
|
176
|
+
| `eleven_v4_turbo` | $0.04 | $0.08 | $1.08 |
|
|
177
|
+
| `eleven_v4` | $0.08 | $0.16 | $2.16 |
|
|
178
|
+
|
|
179
|
+
Check current API pricing for plan and voice-specific rates. The manifest's `characterCost` preserves the provider's billing header verbatim.
|
|
180
|
+
|
|
181
|
+
See [command-line tools](tools.md) for command discovery and execution ownership.
|
|
@@ -269,32 +269,26 @@ Tau keeps tool and lifecycle chatter quiet. It sends committed assistant text, i
|
|
|
269
269
|
|
|
270
270
|
## Attachments and audio
|
|
271
271
|
|
|
272
|
-
Telegram accepts
|
|
272
|
+
Telegram accepts arbitrary documents, photos, videos, animations, video notes, audio files, and voice notes. The agent receives execution-environment paths, sanitized filenames, MIME types, byte sizes, and captions. Receipt never executes files.
|
|
273
273
|
|
|
274
|
-
Limits are
|
|
274
|
+
Limits are 32 attachments per turn, 20 MiB per file, and 100 MiB per turn. Downloads are bounded even without size metadata. Oversized or failed transfers are skipped with a warning.
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
- at most 20 MiB per file
|
|
278
|
-
- at most 100 MiB total per turn
|
|
276
|
+
Uploads only queue files; captions are metadata. The next text or voice transcript submits or steers with one hidden `<system>` block per attachment. Only voice notes are automatically transcribed, up to 20 minutes. Audio-player files and audio documents arrive without transcription. Voice originals remain available even if transcription fails. DM and bot-triggering group transcripts are echoed before submission.
|
|
279
277
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
The local execution environment can access these runner temporary paths. Pending attachments and group context are not snapshot data. Shutdown clears their queues, and startup removes stale `tau-telegram-attachments-*` directories.
|
|
283
|
-
|
|
284
|
-
Telegram `voice` and `audio` messages up to 20 minutes long are downloaded and transcribed. Direct DM turns and bot-triggering group turns echo the transcript to the chat before submission so the sender can verify it.
|
|
278
|
+
Files use native temporary directories in the execution environment; OS cleanup can invalidate their paths. Pending queues and group context clear on shutdown. File contents and metadata are untrusted.
|
|
285
279
|
|
|
286
280
|
OpenAI is the default. Select Gemini with `speechToText.provider`. Runner credentials are:
|
|
287
281
|
|
|
288
282
|
- Gemini: `GEMINI_API_KEY`, then `apiKeys.google`
|
|
289
283
|
- OpenAI: `OPENAI_API_KEY`, then `apiKeys.openai`
|
|
290
284
|
|
|
291
|
-
Gemini extracts spelling hints with Gemini 3.8 Flash and transcribes uploaded audio verbatim with `gemini-3.5-transcribe`, using English (`en-US`) and Finnish (`fi-FI`) hints. It attempts remote file deletion afterward. OpenAI normalizes downloaded audio with runner-side `ffmpeg` and uploads it to `gpt-transcribe`. Missing keys
|
|
285
|
+
Gemini extracts spelling hints with Gemini 3.8 Flash and transcribes uploaded audio verbatim with `gemini-3.5-transcribe`, using English (`en-US`) and Finnish (`fi-FI`) hints. It attempts remote file deletion afterward. OpenAI normalizes downloaded audio with runner-side `ffmpeg` and uploads it to `gpt-transcribe`. Missing keys prevent transcription, not file delivery. See [credentials](credentials.md).
|
|
292
286
|
|
|
293
287
|
`/tts_on` uses `gemini-3.8-flash`, `gemini-3.1-flash-tts-preview`, Despina, the Google key, and runner `ffmpeg` with Opus. Source and rewritten text each allow 10,000 Unicode characters; audio allows 32 MiB. Rewrite and job timeouts are one and five minutes. Jobs are ephemeral. Failure sends `voice response failed. please try again.` without affecting text; details stay in logs.
|
|
294
288
|
|
|
295
289
|
## Command client tools
|
|
296
290
|
|
|
297
|
-
Telegram provides [
|
|
291
|
+
Telegram provides [photo, video, audio, and document delivery tools](tools.md#sending-files-to-telegram), plus workspace-selected command tools. Global `clientTools` definitions provide executables; the workspace's nearest `enabledClientTools` selects an exact subset. An empty list disables configured tools, not built-in delivery tools.
|
|
298
292
|
|
|
299
293
|
These command processes run on the Telegram runner machine with the runner process environment. They can reach the session workspace only through their explicit execution-environment facade, despite physical co-location. Telegram does not advertise TUI-only `diff_review` or `prefill_input` tools.
|
|
300
294
|
|
|
@@ -69,7 +69,7 @@ The tool accepts one exact flat Markdown path. It has no search or list operatio
|
|
|
69
69
|
index.md
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Then follow paths linked by that page. Unknown paths are rejected. The corpus describes supported Tau contracts, not the current effective configuration of a particular session, so use configuration inspection or debug output when the answer depends on local state.
|
|
72
|
+
Then follow paths linked by that page. The tool description also advertises built-in command-line tools with capability summaries and dedicated documentation paths. Agents may read those pages directly when a tool is relevant, without first loading the index. Use of these utilities is optional and depends on the execution environment's prerequisites. Unknown paths are rejected. The corpus describes supported Tau contracts, not the current effective configuration of a particular session, so use configuration inspection or debug output when the answer depends on local state.
|
|
73
73
|
|
|
74
74
|
## Main-session goal tools
|
|
75
75
|
|
|
@@ -133,27 +133,17 @@ Neither tool provides a general read operation. Use a scoped non-interactive Bas
|
|
|
133
133
|
|
|
134
134
|
The supported formats are JPEG, PNG, and WebP. Source reads are capped at 50 MiB. Images larger than 2,000 pixels in either dimension or 2.5 MiB of model payload are resized or re-encoded while preserving aspect ratio. If Tau cannot reduce a valid image below the model payload limit, the call fails. Relative paths resolve from the execution-environment working directory.
|
|
135
135
|
|
|
136
|
-
##
|
|
136
|
+
## Command-line tools
|
|
137
137
|
|
|
138
|
-
`tau tool
|
|
138
|
+
`tau tool` provides standalone utilities for people and agents, usable from a shell inside or outside Tau. Files, configuration, credentials, and required executables must be available on the machine running the command. Agents can invoke these commands through Bash.
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
PDF OCR requires `MISTRAL_API_KEY` or `apiKeys.mistral`, with the environment variable taking precedence. Tau loads configuration for the command's current working directory. The credential and local executable therefore belong to the process running `tau tool`, not to an attached TUI, remote host, or session execution environment unless that is where the command itself runs. See [credentials](credentials.md) for credential ownership.
|
|
147
|
-
|
|
148
|
-
On success, Tau prints the persistent temporary output directory and a complete artifact list. The directory contains:
|
|
149
|
-
|
|
150
|
-
- `document.md`, the complete OCR document with recognized tables inlined;
|
|
151
|
-
- `pages/page-0001.md` and later numbered files, one Markdown file per PDF page; and
|
|
152
|
-
- `images/page-0001/patch-0001.png` and later numbered patches for visual verification.
|
|
140
|
+
| Command | Purpose | Guide |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `tau tool pdf-unpack` | Extract OCR Markdown and page-image patches from a PDF using Mistral. | [PDF unpacking](pdf-unpacking.md) |
|
|
143
|
+
| `tau tool image-generate` | Generate or edit an image using Google or OpenAI. | [Image generation](image-generation.md) |
|
|
144
|
+
| `tau tool speech-generate` | Generate narration or dialogue using ElevenLabs and assemble a WAV. | [Speech generation](speech-generation.md) |
|
|
153
145
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
The command uploads the PDF to Mistral and attempts to delete the remote upload after OCR. A deletion failure is reported in the command output. Successful local artifacts remain on disk for follow-up use; delete them when they are no longer needed. If processing fails, Tau attempts to remove the partial local output directory. Do not use the command for a sensitive document unless sending it to Mistral and retaining derived local artifacts are both permitted.
|
|
146
|
+
Each guide covers setup, input, examples, outputs, and failure behavior. Use `tau tool --help` to list commands or `tau tool <command> --help` for command-specific help. The same guides are packaged for `tau_docs` and linked from its `index.md`.
|
|
157
147
|
|
|
158
148
|
## Code-mode service tools
|
|
159
149
|
|
|
@@ -207,13 +197,24 @@ The TUI advertises `diff_review` and `prefill_input` unless client tools are dis
|
|
|
207
197
|
|
|
208
198
|
Configured command client tools are also client-owned. They can run local client processes and use a bounded execution-environment facade when work belongs on the session machine. Remote attachment makes this distinction visible: the TUI process and its tools may be on a laptop while the host and execution environment are elsewhere. See [client tools](client-tools.md) for configuration, protocol helpers, and limits, and [TUI](tui.md) for diff-tool configuration.
|
|
209
199
|
|
|
210
|
-
### Sending
|
|
200
|
+
### Sending files to Telegram
|
|
201
|
+
|
|
202
|
+
Telegram provides four client tools, each accepting `{ path, caption? }` and delivering to the current chat:
|
|
203
|
+
|
|
204
|
+
| Tool | Delivery | Supported files | Maximum size |
|
|
205
|
+
| --- | --- | --- | --- |
|
|
206
|
+
| `send_photo_to_telegram` | In-chat photo | JPEG/PNG; width plus height at most 10,000 pixels, aspect ratio at most 20 | 10,000,000 bytes |
|
|
207
|
+
| `send_video_to_telegram` | Playable video | MPEG4 | 50,000,000 bytes |
|
|
208
|
+
| `send_audio_to_telegram` | Audio player | MP3/M4A | 50,000,000 bytes |
|
|
209
|
+
| `send_document_to_telegram` | Original file attachment | Any type, including PDF, CSV, ZIP, WAV, and original-quality images | 50,000,000 bytes |
|
|
210
|
+
|
|
211
|
+
Paths may be absolute or relative to the session working directory. Captions are plain text, limited to 1,024 UTF-16 code units. Document delivery preserves original bytes and filenames; photo delivery uses Telegram's native photo processing. File bytes do not enter model context or session history.
|
|
211
212
|
|
|
212
|
-
|
|
213
|
+
Transfers read at most 8,000,000 bytes per execution-environment request and reject non-regular, empty, oversized, or changing files. Tools do not inspect codecs, convert files, or fall back to another delivery method. Telegram validates media compatibility, including photo dimensions. Unsupported media can be explicitly converted before sending or delivered as a document instead.
|
|
213
214
|
|
|
214
|
-
|
|
215
|
+
Reading, cancellation, and Telegram delivery failures fail the tool call. Calls allow five minutes and are not automatically retried, since an interrupted upload may already have reached Telegram.
|
|
215
216
|
|
|
216
|
-
The runner owns upload credentials and binds the recipient to the session's bot and chat; the agent cannot select a recipient.
|
|
217
|
+
The runner owns upload credentials and binds the recipient to the session's bot and chat; the agent cannot select a recipient. These built-in tools are independent of configured command-tool selection and do not appear in TUI sessions or subagents. Inspecting an image with `view_image` does not send it to Telegram. Automatic voice responses through `/tts_on` are separate from these tools.
|
|
217
218
|
|
|
218
219
|
## When a tool is missing or fails
|
|
219
220
|
|