screenkit 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -4
- data/DOCUMENTATION.md +105 -32
- data/Dockerfile +1 -0
- data/lib/screenkit/cli/episode.rb +3 -0
- data/lib/screenkit/exporter/episode.rb +9 -2
- data/lib/screenkit/exporter/segment.rb +2 -2
- data/lib/screenkit/generators/project/screenkit.yml +31 -3
- data/lib/screenkit/schemas/refs/tts_builtin.json +5 -1
- data/lib/screenkit/schemas/tts/elevenlabs.json +4 -0
- data/lib/screenkit/schemas/tts/espeak.json +4 -0
- data/lib/screenkit/schemas/tts/say.json +4 -0
- data/lib/screenkit/tts/base.rb +5 -1
- data/lib/screenkit/utils.rb +1 -1
- data/lib/screenkit/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97a973d1c6ae7d7c373be709a2233a0b935fae81c706f312c03664e730088780
|
|
4
|
+
data.tar.gz: 2bf3c1093ee252e020635ef4f98632975eab1c77436e0769d9b2a3c107cd228c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78c95717248ebfa4fab374c612656813bdf6cd0add77dd1c4dfdc65505033c793b73c1645daeb5742670dfc0e6e5aef84100fabd5ec8cc15a011e95d88fa62e0
|
|
7
|
+
data.tar.gz: 1cca22fd0d8f922fc245be632fcbf587968dc99c402615fe8691eb1e1c45415583f8c1fd2f00c9898c3855a14fd6efe3803c3601102fe8965d563288b5acb4c8
|
data/CHANGELOG.md
CHANGED
|
@@ -11,18 +11,22 @@ Prefix your message with one of the following:
|
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## v0.0.6
|
|
15
|
+
|
|
16
|
+
- [Added] Add `--tts-preset` option to select TTS preset when exporting
|
|
17
|
+
episodes.
|
|
18
|
+
|
|
14
19
|
## v0.0.5
|
|
15
20
|
|
|
16
|
-
- [Added]
|
|
17
|
-
projects.
|
|
21
|
+
- [Added] Add `--skip-bundler` option to skip bundler when generating projects.
|
|
18
22
|
|
|
19
23
|
## v0.0.4
|
|
20
24
|
|
|
21
|
-
- [Fixed]
|
|
25
|
+
- [Fixed] Fix Gemfile template that was pointing to a local path.
|
|
22
26
|
|
|
23
27
|
## v0.0.3
|
|
24
28
|
|
|
25
|
-
- [Changed]
|
|
29
|
+
- [Changed] Keep path as it is when creating project/episode.
|
|
26
30
|
|
|
27
31
|
## v0.0.2
|
|
28
32
|
|
data/DOCUMENTATION.md
CHANGED
|
@@ -39,7 +39,74 @@ gem "screenkit"
|
|
|
39
39
|
### Docker
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
docker run
|
|
42
|
+
$ docker run \
|
|
43
|
+
--platform=linux/amd64 \
|
|
44
|
+
--shm-size=2g \
|
|
45
|
+
-v $PWD:/source \
|
|
46
|
+
--rm -it \
|
|
47
|
+
docker.io/fnando/screenkit new --skip-bundler example
|
|
48
|
+
create Gemfile
|
|
49
|
+
create screenkit.yml
|
|
50
|
+
create resources
|
|
51
|
+
create resources/backtracks/default.aac
|
|
52
|
+
create resources/fonts/open-sans/OFL.txt
|
|
53
|
+
create resources/fonts/open-sans/OpenSans-ExtraBold.ttf
|
|
54
|
+
create resources/fonts/open-sans/OpenSans-SemiBold.ttf
|
|
55
|
+
create resources/fonts/open-sans/README.txt
|
|
56
|
+
create resources/images/logo.png
|
|
57
|
+
create resources/images/watermark.png
|
|
58
|
+
create resources/sounds/chime.mp3
|
|
59
|
+
create resources/sounds/pop.mp3
|
|
60
|
+
create resources/sounds/whoosh.mp3
|
|
61
|
+
|
|
62
|
+
$ cd example
|
|
63
|
+
|
|
64
|
+
$ docker run \
|
|
65
|
+
--platform=linux/amd64 \
|
|
66
|
+
--shm-size=2g \
|
|
67
|
+
-v $PWD:/source \
|
|
68
|
+
--rm -it \
|
|
69
|
+
docker.io/fnando/screenkit episode new --title 'Hello, world!'
|
|
70
|
+
create episodes/001-hello-world/config.yml
|
|
71
|
+
create episodes/001-hello-world/scripts
|
|
72
|
+
create episodes/001-hello-world/scripts/001.txt
|
|
73
|
+
create episodes/001-hello-world/content
|
|
74
|
+
create episodes/001-hello-world/content/001.tape
|
|
75
|
+
create episodes/001-hello-world/resources
|
|
76
|
+
create episodes/001-hello-world/voiceovers
|
|
77
|
+
create episodes/001-hello-world/resources/.keep
|
|
78
|
+
create episodes/001-hello-world/voiceovers/.keep
|
|
79
|
+
|
|
80
|
+
$ docker run \
|
|
81
|
+
--platform=linux/amd64 \
|
|
82
|
+
--shm-size=2g \
|
|
83
|
+
-v $PWD:/source \
|
|
84
|
+
--rm -it \
|
|
85
|
+
docker.io/fnando/screenkit episode export --dir episodes/001-hello-world
|
|
86
|
+
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
87
|
+
┃ Terminal to screencast, simplified ┃═╗
|
|
88
|
+
┃ ███████╗ ██████╗██████╗ ███████╗███████╗███╗ ██╗██╗ ██╗██╗████████╗ ┃ ║
|
|
89
|
+
┃ ██╔════╝██╔════╝██╔══██╗██╔════╝██╔════╝████╗ ██║██║ ██╔╝██║╚══██╔══╝ ┃ ║
|
|
90
|
+
┃ ███████╗██║ ██████╔╝█████╗ █████╗ ██╔██╗ ██║█████╔╝ ██║ ██║ ┃ ║
|
|
91
|
+
┃ ╚════██║██║ ██╔══██╗██╔══╝ ██╔══╝ ██║╚██╗██║██╔═██╗ ██║ ██║ ┃ ║
|
|
92
|
+
┃ ███████║╚██████╗██║ ██║███████╗███████╗██║ ╚████║██║ ██╗██║ ██║ ┃ ║
|
|
93
|
+
┃ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝ ┃ ║
|
|
94
|
+
┃ v0.0.5 ┃ ║
|
|
95
|
+
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ║
|
|
96
|
+
╚══════════════════════════════════════════════════════════════════════════╝
|
|
97
|
+
|
|
98
|
+
info Project root dir: .
|
|
99
|
+
info Episode root dir: episodes/001-hello-world
|
|
100
|
+
info Matching all 1 segments
|
|
101
|
+
info Exported intro in 2.39s
|
|
102
|
+
info Exported outro in 2.11s
|
|
103
|
+
info Generated voiceover in 0.89s
|
|
104
|
+
info Exported videos in 0.00s
|
|
105
|
+
info Created callouts in 0.00s
|
|
106
|
+
info Created segments in 2.55s
|
|
107
|
+
info Merged videos in 8.31s
|
|
108
|
+
info Exported video to output/001-hello-world/001-hello-world.mp4
|
|
109
|
+
info Exported episode in 16.29s
|
|
43
110
|
```
|
|
44
111
|
|
|
45
112
|
Notice that Chrome requires a lot of memory, so you need `--shm-size=2g` (or
|
|
@@ -138,7 +205,8 @@ Export an episode to video.
|
|
|
138
205
|
**Options:**
|
|
139
206
|
|
|
140
207
|
- `--dir` (required) - Episode directory path
|
|
141
|
-
- `--
|
|
208
|
+
- `--tts-api-key` - API key for TTS service (e.g., ElevenLabs)
|
|
209
|
+
- `--tts-preset` - TTS preset name that will be used
|
|
142
210
|
- `--overwrite` - Overwrite existing exported files (default: `false`)
|
|
143
211
|
- `--match-segment` - Only export segments matching this string
|
|
144
212
|
- `--output-dir` - Custom output directory path
|
|
@@ -220,12 +288,12 @@ watermark:
|
|
|
220
288
|
watermark: false
|
|
221
289
|
```
|
|
222
290
|
|
|
223
|
-
### Callout
|
|
291
|
+
### Callout Styles
|
|
224
292
|
|
|
225
293
|
Define reusable callout styles:
|
|
226
294
|
|
|
227
295
|
```yaml
|
|
228
|
-
|
|
296
|
+
callout_styles:
|
|
229
297
|
shadow_block:
|
|
230
298
|
background_color: "#ffff00"
|
|
231
299
|
shadow: "#2242d3" # Color string or false
|
|
@@ -290,8 +358,9 @@ backtrack: false # Disable for this episode
|
|
|
290
358
|
|
|
291
359
|
# Override TTS settings
|
|
292
360
|
tts:
|
|
293
|
-
|
|
294
|
-
|
|
361
|
+
- id: eleven_labs
|
|
362
|
+
engine: eleven_labs
|
|
363
|
+
voice_id: custom_voice_id
|
|
295
364
|
|
|
296
365
|
# Override watermark
|
|
297
366
|
watermark: false
|
|
@@ -642,9 +711,10 @@ Uses the built-in macOS `say` command.
|
|
|
642
711
|
|
|
643
712
|
```yaml
|
|
644
713
|
tts:
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
714
|
+
- id: say
|
|
715
|
+
engine: say
|
|
716
|
+
voice: Alex # Optional: Voice name
|
|
717
|
+
rate: 150 # Words per minute (optional)
|
|
648
718
|
```
|
|
649
719
|
|
|
650
720
|
### ElevenLabs Engine
|
|
@@ -653,22 +723,23 @@ Professional AI voice synthesis.
|
|
|
653
723
|
|
|
654
724
|
```yaml
|
|
655
725
|
tts:
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
726
|
+
- id: eleven_labs
|
|
727
|
+
engine: eleven_labs
|
|
728
|
+
voice_id: "56AoDkrOh6qfVPDXZ7Pt" # Required: ElevenLabs voice ID
|
|
729
|
+
language_code: en # 2-letter language code
|
|
730
|
+
|
|
731
|
+
# Optional: Voice settings
|
|
732
|
+
voice_settings:
|
|
733
|
+
speed: 0.9 # Speech speed (default: 1.0)
|
|
734
|
+
stability: 0.5 # Voice stability (0.0 - 1.0)
|
|
735
|
+
similarity: 0.75 # Voice similarity (0.0 - 1.0)
|
|
736
|
+
style: 0.0 # Speaking style (0.0+)
|
|
737
|
+
|
|
738
|
+
# Optional: Output format
|
|
739
|
+
output_format: mp3_44100_128
|
|
740
|
+
|
|
741
|
+
# Optional: Model ID
|
|
742
|
+
model_id: eleven_monolingual_v1
|
|
672
743
|
```
|
|
673
744
|
|
|
674
745
|
#### ElevenLabs Output Formats
|
|
@@ -729,10 +800,11 @@ end
|
|
|
729
800
|
|
|
730
801
|
```yaml
|
|
731
802
|
tts:
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
803
|
+
- id: custom_engine
|
|
804
|
+
engine: custom_engine # Camelized to CustomEngine
|
|
805
|
+
# Add your custom options here
|
|
806
|
+
api_key: your_api_key
|
|
807
|
+
custom_option: value
|
|
736
808
|
```
|
|
737
809
|
|
|
738
810
|
The engine name is camelized (e.g., `custom_engine` → `CustomEngine`,
|
|
@@ -839,7 +911,7 @@ Today we'll learn how to create amazing screencasts.
|
|
|
839
911
|
|
|
840
912
|
Files are matched by number:
|
|
841
913
|
|
|
842
|
-
- `content/001.tape` → `scripts/001.txt` → `voiceovers/001
|
|
914
|
+
- `content/001.tape` → `scripts/001.txt` → `voiceovers/001.:ext`
|
|
843
915
|
- Segments are processed in numerical order
|
|
844
916
|
- Missing scripts create silent segments
|
|
845
917
|
|
|
@@ -962,7 +1034,7 @@ ScreenKit validates configurations against JSON schemas:
|
|
|
962
1034
|
Use the `yaml-language-server` comment for IDE support:
|
|
963
1035
|
|
|
964
1036
|
```yaml
|
|
965
|
-
# yaml-language-server: $schema
|
|
1037
|
+
# yaml-language-server: $schema=https://screenkit.dev/schemas/project.json
|
|
966
1038
|
```
|
|
967
1039
|
|
|
968
1040
|
---
|
|
@@ -1048,8 +1120,9 @@ bundle exec screenkit ...
|
|
|
1048
1120
|
|
|
1049
1121
|
**TTS not working:**
|
|
1050
1122
|
|
|
1051
|
-
- For ElevenLabs: Set `--
|
|
1123
|
+
- For ElevenLabs: Set `--tts-api-key`
|
|
1052
1124
|
- For macOS `say`: Verify voice name with `say -v ?`
|
|
1125
|
+
- For `espeak`: Ensure `espeak` is installed and in PATH
|
|
1053
1126
|
|
|
1054
1127
|
---
|
|
1055
1128
|
|
data/Dockerfile
CHANGED
|
@@ -38,7 +38,7 @@ module ScreenKit
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def tts_available?
|
|
41
|
-
|
|
41
|
+
tts_engine
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def demotape_options
|
|
@@ -46,7 +46,14 @@ module ScreenKit
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def tts_engine
|
|
49
|
-
|
|
49
|
+
@tts_engine ||=
|
|
50
|
+
if options.tts_preset
|
|
51
|
+
tts_engines.find do |engine|
|
|
52
|
+
engine.id == options.tts_preset && engine.available?
|
|
53
|
+
end
|
|
54
|
+
else
|
|
55
|
+
tts_engines.find(&:available?)
|
|
56
|
+
end
|
|
50
57
|
end
|
|
51
58
|
|
|
52
59
|
def tts_engines
|
|
@@ -294,9 +294,9 @@ module ScreenKit
|
|
|
294
294
|
"#{prefix}-#{index}.{png,#{ContentType.video.join(',')}}"
|
|
295
295
|
).first
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
return callout_path if callout_path
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
raise "Callout file not found for #{prefix}-#{index}"
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
def video_callout?(callout_path)
|
|
@@ -84,23 +84,51 @@ watermark:
|
|
|
84
84
|
# Each TTS engine has its own detection mechanism. For instance, say and espeak
|
|
85
85
|
# checks for a binary with the same name. ElevenLabs checks for the presence of
|
|
86
86
|
# `--tts-api-key`.
|
|
87
|
+
#
|
|
88
|
+
# You can have multiple presets for the same engine. Just set a different
|
|
89
|
+
# configuration block using a different `id`. Then, when you're exporting the
|
|
90
|
+
# video, you can use `--tts-preset <id>`. If you don't provide a preset, the
|
|
91
|
+
# first available engine will be used.
|
|
87
92
|
tts:
|
|
88
93
|
# Apple Say TTS engine configuration.
|
|
89
|
-
-
|
|
94
|
+
- id: say
|
|
95
|
+
engine: say
|
|
96
|
+
rate: 150
|
|
97
|
+
enabled: true
|
|
98
|
+
|
|
99
|
+
# Apple Say TTS engine configuration.
|
|
100
|
+
- id: say_pt_br
|
|
101
|
+
engine: say
|
|
102
|
+
voice: "Luciana"
|
|
90
103
|
rate: 150
|
|
91
104
|
enabled: true
|
|
92
105
|
|
|
93
106
|
# eSpeak TTS engine configuration.
|
|
94
|
-
-
|
|
107
|
+
- id: espeak
|
|
108
|
+
engine: espeak
|
|
95
109
|
rate: 150
|
|
96
110
|
voice: en-us
|
|
97
111
|
enabled: true
|
|
98
112
|
|
|
99
113
|
# Eleven Labs TTS engine configuration.
|
|
100
|
-
-
|
|
114
|
+
- id: eleven_labs
|
|
115
|
+
engine: eleven_labs
|
|
116
|
+
enabled: true
|
|
117
|
+
voice_id: 56AoDkrOh6qfVPDXZ7Pt
|
|
118
|
+
language_code: en
|
|
119
|
+
voice_settings:
|
|
120
|
+
speed: 0.9
|
|
121
|
+
stability: 0.5
|
|
122
|
+
similarity: 0.75
|
|
123
|
+
style: 0.0
|
|
124
|
+
|
|
125
|
+
# Eleven Labs TTS engine configuration.
|
|
126
|
+
- id: eleven_labs_mp3_192k
|
|
127
|
+
engine: eleven_labs
|
|
101
128
|
enabled: true
|
|
102
129
|
voice_id: 56AoDkrOh6qfVPDXZ7Pt
|
|
103
130
|
language_code: en
|
|
131
|
+
output_format: mp3_44100_192
|
|
104
132
|
voice_settings:
|
|
105
133
|
speed: 0.9
|
|
106
134
|
stability: 0.5
|
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|
{ "$ref": "../tts/elevenlabs.json" },
|
|
8
8
|
{
|
|
9
9
|
"type": "object",
|
|
10
|
-
"required": ["engine"],
|
|
10
|
+
"required": ["engine", "id"],
|
|
11
11
|
"additionalProperties": true,
|
|
12
12
|
"properties": {
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "A unique identifier for the tts configuration"
|
|
16
|
+
},
|
|
13
17
|
"engine": {
|
|
14
18
|
"type": "string",
|
|
15
19
|
"description": "The TTS engine to use",
|
data/lib/screenkit/tts/base.rb
CHANGED
|
@@ -8,9 +8,13 @@ module ScreenKit
|
|
|
8
8
|
# Additional options for the tts engine.
|
|
9
9
|
attr_reader :options
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
# The preset name for the tts engine.
|
|
12
|
+
attr_reader :id
|
|
13
|
+
|
|
14
|
+
def initialize(id: nil, enabled: true, **options)
|
|
12
15
|
@enabled = enabled
|
|
13
16
|
@options = options
|
|
17
|
+
@id = id
|
|
14
18
|
end
|
|
15
19
|
|
|
16
20
|
def enabled?
|
data/lib/screenkit/utils.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module ScreenKit
|
|
4
4
|
module Utils
|
|
5
|
-
def has_audio?(path)
|
|
5
|
+
def has_audio?(path) # rubocop:disable Naming/PredicatePrefix
|
|
6
6
|
cmd = "ffprobe -v error -select_streams a:0 -show_entries " \
|
|
7
7
|
"stream=codec_type -of default=noprint_wrappers=1:nokey=1"
|
|
8
8
|
`#{cmd} #{path}`.strip == "audio"
|
data/lib/screenkit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: screenkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nando Vieira
|
|
@@ -385,10 +385,10 @@ metadata:
|
|
|
385
385
|
rubygems_mfa_required: 'true'
|
|
386
386
|
homepage_uri: https://github.com/fnando/screenkit
|
|
387
387
|
bug_tracker_uri: https://github.com/fnando/screenkit/issues
|
|
388
|
-
source_code_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
389
|
-
changelog_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
390
|
-
documentation_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
391
|
-
license_uri: https://github.com/fnando/screenkit/tree/v0.0.
|
|
388
|
+
source_code_uri: https://github.com/fnando/screenkit/tree/v0.0.6
|
|
389
|
+
changelog_uri: https://github.com/fnando/screenkit/tree/v0.0.6/CHANGELOG.md
|
|
390
|
+
documentation_uri: https://github.com/fnando/screenkit/tree/v0.0.6/README.md
|
|
391
|
+
license_uri: https://github.com/fnando/screenkit/tree/v0.0.6/LICENSE.md
|
|
392
392
|
rdoc_options: []
|
|
393
393
|
require_paths:
|
|
394
394
|
- lib
|