@humeai/cli 0.0.1-beta.1

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.
Files changed (3) hide show
  1. package/README.md +93 -0
  2. package/dist/hume +0 -0
  3. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # Hume TTS CLI
2
+
3
+ This is a CLI for Hume AI's [Octave TTS](https://preview.hume.ai/blog/octave-the-first-text-to-speech-model-that-understands-what-it-s-saying) API.
4
+
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
+ ```shell
25
+ npm install -g @humeai/cli
26
+ ```
27
+
28
+
29
+ ## Usage
30
+ ```
31
+ Text to speech
32
+
33
+ ━━━ Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
34
+
35
+ $ hume tts <text>
36
+
37
+ ━━━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
38
+
39
+ -d,--description #0 Description of the desired voice
40
+ -c,--continue,--context-generation-id #0 Previous generation ID for continuation
41
+ -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
42
+ --last-index #0 Index of the generation to use from the previous synthesis.
43
+ -o,--output-dir #0 Output directory for generated audio files
44
+ -n,--num-generations #0 Number of variations to generate
45
+ -p,--prefix #0 Filename prefix for generated audio
46
+ --play #0 Play audio after generation: all variations, just the first, or none
47
+ --play-command #0 Command to play audio files (uses $AUDIO_FILE as placeholder for file path)
48
+ --api-key #0 Override the default API key
49
+ --format #0 Output audio format
50
+ -v,--voice-name #0 Name of a previously saved voice
51
+ --voice-id #0 Direct voice ID to use
52
+ --json Output in JSON format
53
+ --pretty Output in human-readable format
54
+ --base-url #0 Override the default API base URL (for testing purposes)
55
+
56
+ ━━━ Details ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
57
+
58
+ This command converts text to speech using Hume AI's advanced AI voice
59
+ synthesis. You can specify voice characteristics through descriptions or use
60
+ saved voices.
61
+
62
+ ━━━ Examples ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
+
64
+ Basic usage
65
+ $ 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."
66
+
67
+ Saving a voice you like (see `hume voices create --help`)
68
+ $ hume voices create --name influencer_1 --last
69
+
70
+ Using a previously-saved voice
71
+ $ hume tts "Thanks for the 100,000,000,000 likes guys!" -v influencer_1
72
+
73
+ Reading from stdin
74
+ $ echo "I wouldn't be here without you" | hume tts - -v influencer_1
75
+
76
+ Continuing previous text
77
+ $ hume tts "Take some arrows from the quiver" -v influencer_1
78
+ $ hume tts "Take a bow, too" -v influencer_1 --last # should rhyme with 'toe' not 'cow'
79
+
80
+ Using custom audio player (macOS/Linux)
81
+ $ hume tts "Hello world" -v narrator --play-command "mpv $AUDIO_FILE --no-video"
82
+
83
+ Using custom audio player (Windows)
84
+ $ hume tts "Hello world" -v narrator --play-command "powershell -c \"[System.Media.SoundPlayer]::new('$AUDIO_FILE').PlaySync()\""
85
+
86
+ Setting a custom audio player for the session
87
+ $ hume session set tts.playCommand "vlc $AUDIO_FILE --play-and-exit"
88
+
89
+ ━━━ See also ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
90
+ * `hume voices create --help` - Save a voice for later use
91
+ * `hume session --help` - Save settings temporarily so you don't have to repeat yourself
92
+ * `hume config --help` - Save settings more permanently
93
+ ```
package/dist/hume ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@humeai/cli",
3
+ "version": "0.0.1-beta.1",
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"
14
+ },
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}\"",
21
+ "prebuild": "bun build src/index.ts --compile --outfile dist/hume",
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.11",
30
+ "open": "^10.1.0",
31
+ "typanion": "^3.14.0"
32
+ },
33
+ "files": [
34
+ "dist/hume"
35
+ ]
36
+ }