@humeai/cli 0.0.1 → 0.0.2
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/README.md +87 -8
- package/dist/hume +0 -0
- package/package.json +31 -8
- package/src/index.ts +0 -1
package/README.md
CHANGED
|
@@ -1,15 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Hume TTS CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This is a CLI for Hume AI's [Octave TTS](https://hume.ai/blog/octave-the-first-text-to-speech-model-that-understands-what-it-s-saying) API.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Unlike conventional TTS that merely "reads" words, Octave is a speech-language model that understands what words mean in context, unlocking a new level of expressiveness. It acts out characters, generates voices from prompts, and takes instructions to modify the emotion and style of a given utterance.
|
|
6
|
+
|
|
7
|
+
This CLI uses Hume's [Typescript SDK](https://github.com/humeai/hume-typescript-sdk) behind the scenes.
|
|
8
|
+
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
npm install -g @humeai-cli
|
|
13
|
+
hume login
|
|
14
|
+
# Use the browser to login to platform.hume.ai to retrieve your
|
|
15
|
+
# API keys
|
|
16
|
+
hume tts "Are you serious?" --description "whispered, hushed"
|
|
17
|
+
hume voices create --name whisperer --last
|
|
18
|
+
hume tts "I said, are you serious?" --voice-name whisperer
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
The Hume CLI is distributed [via NPM](https://www.npmjs.com/package/@humeai/cli). You can install it globally via:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
npm install -g @humeai/cli
|
|
7
27
|
```
|
|
8
28
|
|
|
9
|
-
|
|
29
|
+
## Usage
|
|
10
30
|
|
|
11
|
-
```bash
|
|
12
|
-
bun run index.ts
|
|
13
31
|
```
|
|
32
|
+
Text to speech
|
|
33
|
+
|
|
34
|
+
━━━ Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
35
|
+
|
|
36
|
+
$ hume tts <text>
|
|
37
|
+
|
|
38
|
+
━━━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
|
|
40
|
+
-d,--description #0 Description of the desired voice
|
|
41
|
+
-c,--continue,--context-generation-id #0 Previous generation ID for continuation
|
|
42
|
+
-l,--last,--continue-from-last Use a generation from a previous synthesis as context. If the last synthesis was created with --num-generations > 1, you must also provide --last-index
|
|
43
|
+
--last-index #0 Index of the generation to use from the previous synthesis.
|
|
44
|
+
-o,--output-dir #0 Output directory for generated audio files
|
|
45
|
+
-n,--num-generations #0 Number of variations to generate
|
|
46
|
+
-p,--prefix #0 Filename prefix for generated audio
|
|
47
|
+
--play #0 Play audio after generation: all variations, just the first, or none
|
|
48
|
+
--play-command #0 Command to play audio files (uses $AUDIO_FILE as placeholder for file path)
|
|
49
|
+
--api-key #0 Override the default API key
|
|
50
|
+
--format #0 Output audio format
|
|
51
|
+
-v,--voice-name #0 Name of a previously saved voice
|
|
52
|
+
--voice-id #0 Direct voice ID to use
|
|
53
|
+
--json Output in JSON format
|
|
54
|
+
--pretty Output in human-readable format
|
|
55
|
+
--base-url #0 Override the default API base URL (for testing purposes)
|
|
56
|
+
|
|
57
|
+
━━━ Details ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
14
58
|
|
|
15
|
-
This
|
|
59
|
+
This command converts text to speech using Hume AI's advanced AI voice
|
|
60
|
+
synthesis. You can specify voice characteristics through descriptions or use
|
|
61
|
+
saved voices.
|
|
62
|
+
|
|
63
|
+
━━━ Examples ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
|
|
65
|
+
Basic usage
|
|
66
|
+
$ hume tts "Make sure to like and subscribe!" --description "The speaker is a charismatic, enthusiastic, male YouTuber in his 20s with a American accent, a slightly breathy voice, and a fast speaking rate."
|
|
67
|
+
|
|
68
|
+
Saving a voice you like (see `hume voices create --help`)
|
|
69
|
+
$ hume voices create --name influencer_1 --last
|
|
70
|
+
|
|
71
|
+
Using a previously-saved voice
|
|
72
|
+
$ hume tts "Thanks for the 100,000,000,000 likes guys!" -v influencer_1
|
|
73
|
+
|
|
74
|
+
Reading from stdin
|
|
75
|
+
$ echo "I wouldn't be here without you" | hume tts - -v influencer_1
|
|
76
|
+
|
|
77
|
+
Continuing previous text
|
|
78
|
+
$ hume tts "Take some arrows from the quiver" -v influencer_1
|
|
79
|
+
$ hume tts "Take a bow, too" -v influencer_1 --last # should rhyme with 'toe' not 'cow'
|
|
80
|
+
|
|
81
|
+
Using custom audio player (macOS/Linux)
|
|
82
|
+
$ hume tts "Hello world" -v narrator --play-command "mpv $AUDIO_FILE --no-video"
|
|
83
|
+
|
|
84
|
+
Using custom audio player (Windows)
|
|
85
|
+
$ hume tts "Hello world" -v narrator --play-command "powershell -c \"[System.Media.SoundPlayer]::new('$AUDIO_FILE').PlaySync()\""
|
|
86
|
+
|
|
87
|
+
Setting a custom audio player for the session
|
|
88
|
+
$ hume session set tts.playCommand "vlc $AUDIO_FILE --play-and-exit"
|
|
89
|
+
|
|
90
|
+
━━━ See also ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
* `hume voices create --help` - Save a voice for later use
|
|
92
|
+
* `hume session --help` - Save settings temporarily so you don't have to repeat yourself
|
|
93
|
+
* `hume config --help` - Save settings more permanently
|
|
94
|
+
```
|
package/dist/hume
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humeai/cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"module": "index.ts",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "CLI for Hume.ai's OCTAVE expressive TTS API",
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/bun": "^1.2.2",
|
|
9
|
+
"@types/debug": "^4.1.12",
|
|
10
|
+
"prettier": "^3.5.2"
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"typescript": "^5.0.0"
|
|
8
14
|
},
|
|
9
|
-
"files": [
|
|
10
|
-
"./dist/hume"
|
|
11
|
-
],
|
|
12
15
|
"scripts": {
|
|
16
|
+
"test": "bun test",
|
|
17
|
+
"test:verbose": "BUN_TEST_VERBOSE=1 bun test",
|
|
18
|
+
"typecheck": "tsc --noEmit",
|
|
19
|
+
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
|
|
20
|
+
"format:check": "prettier --check \"**/*.{ts,js,json,md}\"",
|
|
13
21
|
"prebuild": "bun build src/index.ts --compile --outfile dist/hume",
|
|
14
22
|
"prepublishOnly": "npm run prebuild"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@clack/prompts": "^0.10.0",
|
|
26
|
+
"bun": "^1.2.2",
|
|
27
|
+
"clipanion": "^4.0.0-rc.4",
|
|
28
|
+
"debug": "^4.4.0",
|
|
29
|
+
"hume": "^0.9.12",
|
|
30
|
+
"open": "^10.1.0",
|
|
31
|
+
"typanion": "^3.14.0"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist/hume"
|
|
35
|
+
],
|
|
36
|
+
"bin": {
|
|
37
|
+
"hume": "dist/hume"
|
|
15
38
|
}
|
|
16
39
|
}
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
console.log("Hello via Bun!");
|