-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
170 lines (121 loc) · 5.39 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Narakeet API client
Command line client that allows building videos using the Narakeet API.
See https://www.narakeet.com/docs/automating/ for more information.
Installation:
Install from NPM using "npm i -g @narakeet/api-client"
Upgrade from a previous version using "npm i -g @narakeet/api-client@latest"
Usage:
narakeet-api-client --api-key <api-key> \
--source <source file> \
--repository <repository> \
--repository-type <repository type> \
[optional arguments]
Mandatory arguments:
* --api-key: Your Narakeet API key
Additional arguments for video projects:
* --source: (Required) Narakeet script path inside the repository
* --repository: (Required) Narakeet project location
See "Repository types" below for more information
* --repository-type: (Required) Project location type (eg github or local-dir)
See "Repository types" below for more information
Additional arguments for GitHub repositories:
* --github-token: (Required) repository access token
* --github-sha: (Optional) source commit SHA
useful for building from a specific tag or version
if not specified, the current head commit will be used
Additional arguments for audio (text-to-speech) projects:
* --script: input text for speech synthesis, required if script-file is not specified
* --script-file: (Optional) file containing the input script, relative to current directory
* --output-type: (Optional) output file type. "wav", "m4a" or "mp3".
Defaults to m4a
* --voice: (Optional) default voice for text-to-speech synthesis. See
https://www.narakeet.com/languages/ for available options
Optional arguments:
* --output: File name for the resulting file.
Default: result.mp4 for videos, or result.<type> for audio
* --project-type: "video" or "audio". selects slower video build or faster
text-to-speech build. Default: video
* --verbose: Print troubleshooting information when working
* --api-url: override the API url, useful for testing
Repository types:
local-dir:
Use the files inside a directory on your local disk.
To use this option, provide the following:
--repository: Directory path for the project
--source: path inside the directory for your main script file
NOTE: This requires your OS TEMP directory to be writable,
as the client will create a temporary ZIP file there
and upload it to Narakeet. If the TEMP dir is not writable,
use the local-zip repository type.
local-zip:
Package your project as a ZIP file on your local disk.
To use this option, provide the following:
--repository: path to the ZIP archive on your local disk
--source: path inside the archive four main script file
zip-url:
Package your project as a ZIP file, and upload it somewhere for Narakeet to
download. (for example, upload to S3 and generate a pre-signed URL for
private downlads).
To use this option, provide the following:
--repository: URL of your ZIP file
--source: path inside the archive to your main script file
github:
Commit your project to GitHub, and build directly from the repository.
To use this option, provide the following:
--repository-type: github
--repository: GitHub repository name (user/project)
--github-token: access token with rights to download the repository
--github-sha: optional, SHA commit to download
Examples:
Build a video from a local directory:
narakeet-api-client --api-key $API_KEY \
--source source.md \
--repository my-video-project \
--repository-type local-dir
Build a video from a local zip:
narakeet-api-client --api-key $API_KEY \
--source source.md \
--repository my-video-project.zip \
--repository-type local-zip
Build a video from a git repo:
narakeet-api-client --api-key $API_KEY \
--source hello-world/script/source.md \
--repository narakeet/examples \
--repository-type github \
--github-token $GITHUB_TOKEN
Build a video from a ZIP published to a URL:
narakeet-api-client --api-key $API_KEY \
--repository $URL \
--source source.md \
--repository-type zip-url
Build an audio WAV from text, saving to result.wav:
narakeet-api-client --api-key $API_KEY \
--project-type audio \
--script "Hi there" \
--output-type wav
Build an audio WAV from text, using voice Brian, saving to result.wav:
narakeet-api-client --api-key $API_KEY \
--project-type audio \
--script "Hi there" \
--output-type wav \
--voice brian
Build an audio WAV from text, using voice Brian, saving to brian.wav:
narakeet-api-client --api-key $API_KEY \
--project-type audio \
--script "Hi there" \
--output-type wav \
--voice brian \
--output brian.wav
Build an audio MP3 from a local text file, saving to result.mp3:
narakeet-api-client --api-key $API_KEY \
--project-type audio \
--script-file script.txt \
--output-type mp3
Build an audio WAV from a local text file, using the Rodney
voice, saving to my-script.wav
narakeet-api-client --api-key $API_KEY \
--project-type audio \
--script-file script.txt \
--output-type wav \
--voice rodney \
--output my-script.wav