├── .babelrc ├── .eslintignore ├── .eslintrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── .nvmrc ├── README.md ├── example-output ├── test-premiere.xml ├── test-presegment.txt ├── test.csv ├── test.json └── test.txt ├── example-usage.js ├── package-lock.json ├── package.json ├── sample └── words-list.sample.json └── src ├── compose-subtitles ├── csv.js ├── itt.js ├── premiere.js ├── srt.js ├── ttml.js ├── util │ ├── escape-text.js │ ├── format-seconds.js │ └── tc-format.js └── vtt.js ├── index.js └── presegment-text ├── README.md ├── divide-into-two-lines ├── README.md ├── index.js └── index.test.js ├── fold ├── README.md ├── index.js └── index.test.js ├── index.js ├── index.test.js ├── line-break-between-sentences ├── README.md ├── index.js └── index.test.js ├── steps.md ├── text-segmentation ├── HONORIFICS.txt ├── README.md ├── index.js └── index.test.js └── util ├── remove-space-after-carriage-return.js └── remove-space-at-beginning-of-line.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ] 5 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | docs 3 | /dist 4 | /build 5 | **/**.json 6 | **/sample 7 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "plugins": [ 4 | ], 5 | "extends": [ 6 | ], 7 | "env": { 8 | "browser": true, 9 | "jest": true 10 | }, 11 | "rules": { 12 | "prefer-const": 1, 13 | "space-infix-ops": ["error", {"int32Hint": false}], 14 | "no-unused-expressions": "error", 15 | "no-trailing-spaces": "error", 16 | "no-nested-ternary": "error", 17 | "indent": ["warn", 2], 18 | "arrow-spacing": ["error", { "before": true, "after": true }], 19 | "space-in-parens": [ 0, "never" ], 20 | "template-curly-spacing": [ 2, "always" ], 21 | "array-bracket-spacing": [ 2, "always" ], 22 | "object-curly-spacing": [ 2, "always" ], 23 | "computed-property-spacing": [ 2, "never" ], 24 | "no-multiple-empty-lines": [ 2, { "max": 1, "maxEOF": 0, "maxBOF": 0 } ], 25 | "quotes": [ 1, "single", "avoid-escape" ], 26 | "no-use-before-define": [ 2, { "functions": false } ], 27 | "semi": [1, "always"], 28 | "class-methods-use-this": [ 1 ], 29 | "no-console": 0, 30 | "no-undef": [ 1 ], 31 | "no-case-declarations": [ 1 ], 32 | "no-return-assign": [ 1 ], 33 | "no-param-reassign": [ 1 ], 34 | "no-shadow": [ 1 ], 35 | "camelcase": [ 1 ], 36 | "no-underscore-dangle" : [0, "always"], 37 | "keyword-spacing": ["error", { "before": true, "after": true }], 38 | "key-spacing": ["error", { "afterColon": true }], 39 | "newline-before-return": "error", 40 | "space-before-blocks": "error", 41 | "no-unused-vars": "error", 42 | "no-multi-spaces": "warn", 43 | "comma-spacing": ["error", { "before": false, "after": true }], 44 | "prefer-destructuring": ["error", { 45 | "VariableDeclarator": { 46 | "array": false, 47 | "object": false 48 | } 49 | }] 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: pietrop 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | 22 | 23 | **Screenshots** 24 | 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: Enhancement 6 | assignees: pietrop 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | 12 | 13 | **Describe the solution you'd like** 14 | 15 | 16 | **Describe alternatives you've considered** 17 | 18 | 19 | **Additional context** 20 | 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question about this project 4 | title: '' 5 | labels: bug 6 | assignees: pietrop 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Is your Pull Request request related to another [issue](https://github.com/bbc/subtitles-generator/issues) in this repository ?** 2 | 3 | 4 | **Describe what the PR does** 5 | 6 | 7 | 8 | **State whether the PR is ready for review or whether it needs extra work** 9 | 10 | 11 | **Additional context** 12 | 13 | 14 | 15 | 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # component to distribute to npm 15 | /dist 16 | 17 | # misc 18 | .DS_Store 19 | .env.local 20 | .env.development.local 21 | .env.test.local 22 | .env.production.local 23 | 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | 29 | # Node specific .gitignore 30 | # Logs 31 | logs 32 | *.log 33 | npm-debug.log* 34 | yarn-debug.log* 35 | yarn-error.log* 36 | 37 | # Runtime data 38 | pids 39 | *.pid 40 | *.seed 41 | *.pid.lock 42 | 43 | # Directory for instrumented libs generated by jscoverage/JSCover 44 | lib-cov 45 | 46 | # Coverage directory used by tools like istanbul 47 | coverage 48 | 49 | # nyc test coverage 50 | .nyc_output 51 | 52 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 53 | .grunt 54 | 55 | # Bower dependency directory (https://bower.io/) 56 | bower_components 57 | 58 | # node-waf configuration 59 | .lock-wscript 60 | 61 | # Compiled binary addons (https://nodejs.org/api/addons.html) 62 | build/Release 63 | 64 | # Dependency directories 65 | node_modules/ 66 | jspm_packages/ 67 | 68 | # TypeScript v1 declaration files 69 | typings/ 70 | 71 | # Optional npm cache directory 72 | .npm 73 | 74 | # Optional eslint cache 75 | .eslintcache 76 | 77 | # Optional REPL history 78 | .node_repl_history 79 | 80 | # Output of 'npm pack' 81 | *.tgz 82 | 83 | # Yarn Integrity file 84 | .yarn-integrity 85 | 86 | # dotenv environment variables file 87 | .env 88 | 89 | # next.js build output 90 | .next 91 | 92 | stats.json 93 | 94 | #ignore all video files 95 | *.wmv 96 | *.mpg 97 | *.mpeg 98 | *.mp4 99 | *.mov 100 | *.flv 101 | *.avi 102 | *.ogv 103 | *.ogg 104 | *.webm 105 | 106 | #ignore audio file 107 | *.wav 108 | *.mp3 109 | 110 | #ingore subtitles files 111 | *.srt 112 | *.sbv 113 | *.vtt 114 | *.ttml 115 | *.itt 116 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | demo 3 | lib 4 | packages 5 | build 6 | .babelrc 7 | .babel.config.js 8 | webpack.config.js -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/dubnium -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Subtitles Generator - draft 2 | 3 | A node module to generate subtitles by segmenting a list of time-coded text. 4 | 5 | Exports to 6 | - [x] TTML for Premiere as `.xml` 7 | - [x] TTML 8 | - [x] iTT - for Apple 9 | - [x] srt 10 | - [x] vtt 11 | - [x] csv 12 | - [x] txt - pre-segmented text 13 | 14 | It can also provide pre-segmented lines if the input is plain text. 15 | 16 | ## Setup 17 | 19 | 20 | git clone, cd into folder, `npm install` 21 | 22 | 23 | ## Usage 24 | 25 | ```js 26 | const subtitlesComposer = require('./src/index.js'); 27 | // const sampleWords = // some word json 28 | const subtitlesJson = subtitlesComposer({words: sampleWords, type: 'json'}) 29 | const ttmlPremiere = subtitlesComposer({words: sampleWords, type: 'premiere'}) 30 | const ittData = subtitlesComposer({words: sampleWords, type: 'itt'}) 31 | const ttmlData = subtitlesComposer({words: sampleWords, type: 'ttml'}) 32 | const srtData = subtitlesComposer({words: sampleWords, type: 'srt'}) 33 | const vttData = subtitlesComposer({words: sampleWords, type: 'vtt'}) 34 | ``` 35 | see [`example-usage.js`](./example-usage.js) for more comprehensive example. 36 | 37 | To try locally 38 | ``` 39 | npx babel-node example-usage.js 40 | ``` 41 | 42 | ### `words` Input 43 | - either an array list of words objects 44 | example 45 | ```js 46 | const sampleWords =[ 47 | { 48 | "id": 0, 49 | "start": 13.02, 50 | "end": 13.17, 51 | "text": "There" 52 | }, 53 | { 54 | "id": 1, 55 | "start": 13.17, 56 | "end": 13.38, 57 | "text": "is" 58 | }, 59 | { 60 | "id": 2, 61 | "start": 13.38, 62 | "end": 13.44, 63 | "text": "a" 64 | }, 65 | { 66 | "id": 3, 67 | "start": 13.44, 68 | "end": 13.86, 69 | "text": "day." 70 | }, 71 | ... 72 | ``` 73 | - or a string of text 74 | Example 75 | ```js 76 | const sampleWords = "There is a day. ..." 77 | ``` 78 | 79 | If input `words` is plain text only (and not a list of words with timecodes) then can only use `pre-segment-txt` option. (see [`test-presegment.txt`](./example-output/test-presegment.txt) for example) 80 | 81 | ## Output: 82 | see [`example-output`](./example-output) folder for examples. 83 | 84 | 85 | ## System Architecture 86 | 87 | 88 | In pseudo code, at a high level 89 | ``` 90 | // expecting array list of words OR plain text string 91 | 92 | // if array list of words, convert text into string 93 | 94 | // presegment the text 95 | using pre segmentation algorithm to break into line of x char - default 35 96 | 97 | // generate subtitles 98 | use subtitles generators for various format to convert presegemented json into subtitles 99 | 100 | // return trsult 101 | ``` 102 | 103 | Segmentation algorithm refactored from [`pietrop/subtitlesComposer`](https://github.com/pietrop/subtitlesComposer) originally by [@polizoto](https://github.com/polizoto). 104 | And subtitles generation in various originally format by [`@laurian`](https://github.com/laurian) and [`@maboa`](https://github.com/maboa)as part of BBC Subtitlelizer project. 105 | 106 | ## Development env 107 | 110 | 111 | - npm > `6.1.0` 112 | - [Node 10 - dubnium](https://scotch.io/tutorials/whats-new-in-node-10-dubnium) 113 | - [Eslint](https://eslint.org/) 114 | - [Babel](https://babeljs.io/) 115 | 116 | Node version is set in node version manager [`.nvmrc`](https://github.com/creationix/nvm#nvmrc) 117 | 118 | ## Build 119 | 120 | 121 | ``` 122 | npm run build 123 | ``` 124 | 125 | uses [babel-cli](https://babeljs.io/docs/en/babel-cli) to transpile ES6 into the `./build` folder. 126 | 127 | 128 | ## Tests 129 | 130 | 131 | ``` 132 | npm test 133 | ``` 134 | 135 | To run tests during development 136 | 137 | ``` 138 | npm run test:watch 139 | ``` 140 | 141 | ## Linting 142 | To run linter 143 | 144 | ``` 145 | npm run lint 146 | ``` 147 | 148 | To run and fix 149 | ``` 150 | npm run lint:fix 151 | ``` 152 | 153 | ## Deployment 154 | 155 | 156 | _coming soon, deploying to npm registry as [@bbc/subtitles-composer]()_ 157 | 158 | ``` 159 | npm run publish:public 160 | ``` 161 | 162 | --- 163 | 164 | # TODO 165 | - [ ] Open source 166 | - [x] use import/export in modules 167 | - [x] add babel 168 | -------------------------------------------------------------------------------- /example-output/test-premiere.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

There is a day.

16 |

About ten years ago when I asked a

17 |

friend to hold a baby dinosaur
robot upside down.

18 |

It was a toy called plea.

19 |

All It's a super courts are

20 |

showing off to my friend and I
said to hold it, but he'll see

21 |

what debts.

22 |

We were watching the theatrics of

23 |

this robe that struggle and cry
out and and after a few The first.

24 |

After my little and I said o.k.

25 |

That's enough.

26 |

Now, let's put him back down and
pepper, about to make it.

27 |

Stop crying and I was kind of a
weird experience for me one thing,

28 |

wasn't the most maternal person at
the time.

29 |

Although, since then I've become a
mother and nine months ago.

30 |

And that is a score when hold them
up to now, but my response to this

31 |

robot was also interesting because
I knew exactly how this machine

32 |

work it.

33 |

And yet.

34 |

I still felt compelled to be kind
to it.

35 |

And that observation sparked that
curiosity that I spent the decade

36 |

pursuing it.

37 |

Why did they comfort this robe.

38 |

One of the things I discovered was
my treatment of this machine was

39 |

more than just an awkward moment
in my living room that in a world

40 |

were increasingly integrating
robots into our lives and things

41 |

like that might actually have
consequences because the first

42 |

thing that I discovered is that.

43 |

It's not just me in two thousand

44 |

seven.

45 |

The Washington Post reported that

46 |

the United States military was
testing this robot diffused

47 |

landmines.

48 |

We workers were shaped like a

49 |

stick insect would walk around a
minefield on its legs and every

50 |

time he stepped on a mine.

51 |

One of the legs would blow up

52 |

would continue on the other legs
to block your minds in the colonel

53 |

was in charge of this testing
exercise for calling it off

54 |

because he says it's too inhumane
to watch this damage robot drag

55 |

itself along What would cause a
hardened military officer and

56 |

someone like myself to have this
response to row.

57 |

But what.

58 |

Of course for prime for science

59 |

fiction, pop culture really want
to personify these things, but it

60 |

goes a little bit deeper than that
it turns out that we are

61 |

biologically hard wired to project
intent and life onto any movement

62 |

in a physical space.

63 |

It seems I promised us people

64 |

treat all sort of robots like
their life.

65 |

These bomb disposal units get
names.

66 |

They get medals of honour had
funeral for them with gun salutes.

67 |

Research shows that we do this.

68 |

Even with very simple household

69 |

robots like the room.

70 |

A vacuum cleaner.

71 |

Just a desk that runs around the
floor and clean it just the fact

72 |

that it's moving around on his own
will cause people to name the

73 |

marimba and feel bad for the room.

74 |

But when he gets stuck under the

75 |

couch.

76 |

We can design about specifically

77 |

to invoke this response using eyes
and faces were movement.

78 |

People are magically
subconsciously associate with

79 |

state of mind.

80 |

There's an entire body of research

81 |

called Human robot interaction
that really shows how all this

82 |

works so.

83 |

For example.

84 |

Researchers at Stamford University
found out that makes people really

85 |

uncomfortable and asked them to
touch her about his private parts

86 |

from this from any other studies.

87 |

We know.

88 |

We know that people respond to the
cues given to them by the lifelike

89 |

machines.

90 |

Even if they know that they're not

91 |

real.

92 |

We're heading towards a world

93 |

where robots are everywhere about
the technology is moving out from

94 |

behind factory was entering
workplaces households and as these

95 |

machines.

96 |

They can sense and make a ton of

97 |

my decisions and learn enter into
the shared spaces.

98 |

I think that maybe the best
analogy.

99 |

We have for this is our
relationship with animals.

100 |

Thousands of years ago, we started
to domesticate animals and we

101 |

train them for work and weaponry
and companionship.

102 |

Throughout history.

103 |

We've treated.

104 |

Some animals like tools are the
products and other animals.

105 |

We treated with kindness and given
a place in society as our

106 |

companions.

107 |

I think it's possible.

108 |

We might start to integrate
Robartes, but similar weights

109 |

animals are alive.

110 |

Robert and that.

111 |

And I can tell you from working.

112 |

What about the sister were pretty

113 |

far away from developing robots.

114 |

They can feel anything there, but

115 |

we feel for And that matters
because if we're trying to

116 |

integrate robots into the shared
spaces need to understand that

117 |

people treat them differently than
other devices that in some cases.

118 |

For example, the case of a soldier
who becomes emotionally attached

119 |

to the robot.

120 |

They work.

121 |

Well, if that can be anything from
inefficient to dangerous.

122 |

But in other cases.

123 |

It can actually be used for the

124 |

faster this emotional connection
to, but we're really seeing some

125 |

great use cases.

126 |

For example, robots working with

127 |

autistic children to engage them
in ways that we haven't seen

128 |

previously robot's working with
teachers to engage kids and

129 |

learning with new and it's not
just for kids early studies show

130 |

that we can help doctors and
patients and health care settings

131 |

and this is the pirate b. b. c.

132 |

But it's used in nursing homes

133 |

with dementia patients has been
around for a while I remember

134 |

years ago.

135 |

Being a party and telling someone

136 |

about this throwback and her
response was I can't believe we're

137 |

giving people robots instead of
human care.

138 |

is a really common response and I
think it's absolutely correct

139 |

because that would be terrible.

140 |

And in this case.

141 |

It's not with this robot replace
it with this robot replaces his

142 |

animal therapy in context which he
was real animals.

143 |

We can use robots because people
consistently treat them like more.

144 |

More like an animal and have it
acknowledging this emotional

145 |

connection.

146 |

Robert, can also help us

147 |

anticipate challenges as these
devices.

148 |

Move into more intimate areas of
people's lives and for example is

149 |

it.

150 |

o.k.

151 |

If your child's teddy bear robot
records private conversations.

152 |

Is it.

153 |

o.k.

154 |

If your sex robot has compelling
in our purchasers because rope.

155 |

That's plus capitalism equals
questions around consumer

156 |

protection and privacy and those
aren't the only reason, said her

157 |

behaviour around these machines
could, madam.

158 |

A few years after that first
initial experience.

159 |

I had with this baby dinosaur
robot do workshop with her friend

160 |

Hannah Scott.

161 |

Scott, then we took five of these

162 |

baby dinosaur about we give them.

163 |

The five teams of people.

164 |

We had the name them and play with
them and them for about an hour.

165 |

Then we unveiled a him or a
hatchet and we told them to

166 |

torture and kill the row and then
this turned out to be a little

167 |

more dramatic than we expected it
to be because none of the

168 |

participants wouldn't even so much
as straight.

169 |

A robot.

170 |

So we had to improvise.

171 |

End at some point.

172 |

He said o.k.

173 |

You can save your team's robot.

174 |

If you destroy another team throw.

175 |

I And anyone that didn't work.

176 |

They couldn't do it.

177 |

So finally said, We're gonna
destroy all the robots are someone

178 |

takes a hatchet to one of them.

179 |

This guy stood up and he took the

180 |

hatchet and the whole room,
Winston.

181 |

See brother had to down on the
robot's neck and there was this

182 |

half joking.

183 |

Is there reason to.

184 |

For example, prevent the child
from kicking about Doc That just

185 |

out of respect for property
because the child may be more

186 |

likely to take a real dark and
again.

187 |

It's not just kids and this is the
violent video games question, but

188 |

it's a completely new level
because of this visceral

189 |

physicality that we respond more
intensely.

190 |

Two images on a screen, we behave
violently towards Robarts

191 |

specifically robots that are
designed to mimic life is is that

192 |

training cruelty muscles.

193 |

The answer to this question has

194 |

the potential impact human
behaviour has the potential impact

195 |

social norms.

196 |

It has the potential to inspire

197 |

rules around.

198 |

What we can and can't do certain

199 |

Robarts animal cruelty, because
even if robots can't fuel our

200 |

behaviour towards a matter for us
and regardless of whether we end

201 |

up changing ovals robots might be
able to help us come to a new

202 |

understanding of ourselves.

203 |

Most of what learned over the past

204 |

ten years have not been about
technology.

205 |

A It's been about human psychology
and empathy and how we relate to

206 |

others.

207 |

And because when a child is kind

208 |

to her room.

209 |

But when a soldier tries to save a

210 |

robot on the battlefield.

211 |

When a group of people refuses to

212 |

harm her about a baby dinosaur.

213 |

Those robots aren't just motors in

214 |

years and a groom's.

215 |
216 | 217 |
-------------------------------------------------------------------------------- /example-output/test-presegment.txt: -------------------------------------------------------------------------------- 1 | There is a day. 2 | 3 | About ten years ago when I asked a 4 | 5 | friend to hold a baby dinosaur 6 | robot upside down. 7 | 8 | It was a toy called plea. 9 | 10 | All It's a super courts are 11 | 12 | showing off to my friend and I 13 | said to hold it, but he'll see 14 | 15 | what debts. 16 | 17 | We were watching the theatrics of 18 | 19 | this robe that struggle and cry 20 | out and and after a few The first. 21 | 22 | After my little and I said o.k. 23 | 24 | That's enough. 25 | 26 | Now, let's put him back down and 27 | pepper, about to make it. 28 | 29 | Stop crying and I was kind of a 30 | weird experience for me one thing, 31 | 32 | wasn't the most maternal person at 33 | the time. 34 | 35 | Although, since then I've become a 36 | mother and nine months ago. 37 | 38 | And that is a score when hold them 39 | up to now, but my response to this 40 | 41 | robot was also interesting because 42 | I knew exactly how this machine 43 | 44 | work it. 45 | 46 | And yet. 47 | 48 | I still felt compelled to be kind 49 | to it. 50 | 51 | And that observation sparked that 52 | curiosity that I spent the decade 53 | 54 | pursuing it. 55 | 56 | Why did they comfort this robe. 57 | 58 | One of the things I discovered was 59 | my treatment of this machine was 60 | 61 | more than just an awkward moment 62 | in my living room that in a world 63 | 64 | were increasingly integrating 65 | robots into our lives and things 66 | 67 | like that might actually have 68 | consequences because the first 69 | 70 | thing that I discovered is that. 71 | 72 | It's not just me in two thousand 73 | 74 | seven. 75 | 76 | The Washington Post reported that 77 | 78 | the United States military was 79 | testing this robot diffused 80 | 81 | landmines. 82 | 83 | We workers were shaped like a 84 | 85 | stick insect would walk around a 86 | minefield on its legs and every 87 | 88 | time he stepped on a mine. 89 | 90 | One of the legs would blow up 91 | 92 | would continue on the other legs 93 | to block your minds in the colonel 94 | 95 | was in charge of this testing 96 | exercise for calling it off 97 | 98 | because he says it's too inhumane 99 | to watch this damage robot drag 100 | 101 | itself along What would cause a 102 | hardened military officer and 103 | 104 | someone like myself to have this 105 | response to row. 106 | 107 | But what. 108 | 109 | Of course for prime for science 110 | 111 | fiction, pop culture really want 112 | to personify these things, but it 113 | 114 | goes a little bit deeper than that 115 | it turns out that we are 116 | 117 | biologically hard wired to project 118 | intent and life onto any movement 119 | 120 | in a physical space. 121 | 122 | It seems I promised us people 123 | 124 | treat all sort of robots like 125 | their life. 126 | 127 | These bomb disposal units get 128 | names. 129 | 130 | They get medals of honour had 131 | funeral for them with gun salutes. 132 | 133 | Research shows that we do this. 134 | 135 | Even with very simple household 136 | 137 | robots like the room. 138 | 139 | A vacuum cleaner. 140 | 141 | Just a desk that runs around the 142 | floor and clean it just the fact 143 | 144 | that it's moving around on his own 145 | will cause people to name the 146 | 147 | marimba and feel bad for the room. 148 | 149 | But when he gets stuck under the 150 | 151 | couch. 152 | 153 | We can design about specifically 154 | 155 | to invoke this response using eyes 156 | and faces were movement. 157 | 158 | People are magically 159 | subconsciously associate with 160 | 161 | state of mind. 162 | 163 | There's an entire body of research 164 | 165 | called Human robot interaction 166 | that really shows how all this 167 | 168 | works so. 169 | 170 | For example. 171 | 172 | Researchers at Stamford University 173 | found out that makes people really 174 | 175 | uncomfortable and asked them to 176 | touch her about his private parts 177 | 178 | from this from any other studies. 179 | 180 | We know. 181 | 182 | We know that people respond to the 183 | cues given to them by the lifelike 184 | 185 | machines. 186 | 187 | Even if they know that they're not 188 | 189 | real. 190 | 191 | We're heading towards a world 192 | 193 | where robots are everywhere about 194 | the technology is moving out from 195 | 196 | behind factory was entering 197 | workplaces households and as these 198 | 199 | machines. 200 | 201 | They can sense and make a ton of 202 | 203 | my decisions and learn enter into 204 | the shared spaces. 205 | 206 | I think that maybe the best 207 | analogy. 208 | 209 | We have for this is our 210 | relationship with animals. 211 | 212 | Thousands of years ago, we started 213 | to domesticate animals and we 214 | 215 | train them for work and weaponry 216 | and companionship. 217 | 218 | Throughout history. 219 | 220 | We've treated. 221 | 222 | Some animals like tools are the 223 | products and other animals. 224 | 225 | We treated with kindness and given 226 | a place in society as our 227 | 228 | companions. 229 | 230 | I think it's possible. 231 | 232 | We might start to integrate 233 | Robartes, but similar weights 234 | 235 | animals are alive. 236 | 237 | Robert and that. 238 | 239 | And I can tell you from working. 240 | 241 | What about the sister were pretty 242 | 243 | far away from developing robots. 244 | 245 | They can feel anything there, but 246 | 247 | we feel for And that matters 248 | because if we're trying to 249 | 250 | integrate robots into the shared 251 | spaces need to understand that 252 | 253 | people treat them differently than 254 | other devices that in some cases. 255 | 256 | For example, the case of a soldier 257 | who becomes emotionally attached 258 | 259 | to the robot. 260 | 261 | They work. 262 | 263 | Well, if that can be anything from 264 | inefficient to dangerous. 265 | 266 | But in other cases. 267 | 268 | It can actually be used for the 269 | 270 | faster this emotional connection 271 | to, but we're really seeing some 272 | 273 | great use cases. 274 | 275 | For example, robots working with 276 | 277 | autistic children to engage them 278 | in ways that we haven't seen 279 | 280 | previously robot's working with 281 | teachers to engage kids and 282 | 283 | learning with new and it's not 284 | just for kids early studies show 285 | 286 | that we can help doctors and 287 | patients and health care settings 288 | 289 | and this is the pirate b. b. c. 290 | 291 | But it's used in nursing homes 292 | 293 | with dementia patients has been 294 | around for a while I remember 295 | 296 | years ago. 297 | 298 | Being a party and telling someone 299 | 300 | about this throwback and her 301 | response was I can't believe we're 302 | 303 | giving people robots instead of 304 | human care. 305 | 306 | is a really common response and I 307 | think it's absolutely correct 308 | 309 | because that would be terrible. 310 | 311 | And in this case. 312 | 313 | It's not with this robot replace 314 | it with this robot replaces his 315 | 316 | animal therapy in context which he 317 | was real animals. 318 | 319 | We can use robots because people 320 | consistently treat them like more. 321 | 322 | More like an animal and have it 323 | acknowledging this emotional 324 | 325 | connection. 326 | 327 | Robert, can also help us 328 | 329 | anticipate challenges as these 330 | devices. 331 | 332 | Move into more intimate areas of 333 | people's lives and for example is 334 | 335 | it. 336 | 337 | o.k. 338 | 339 | If your child's teddy bear robot 340 | records private conversations. 341 | 342 | Is it. 343 | 344 | o.k. 345 | 346 | If your sex robot has compelling 347 | in our purchasers because rope. 348 | 349 | That's plus capitalism equals 350 | questions around consumer 351 | 352 | protection and privacy and those 353 | aren't the only reason, said her 354 | 355 | behaviour around these machines 356 | could, madam. 357 | 358 | A few years after that first 359 | initial experience. 360 | 361 | I had with this baby dinosaur 362 | robot do workshop with her friend 363 | 364 | Hannah Scott. 365 | 366 | Scott, then we took five of these 367 | 368 | baby dinosaur about we give them. 369 | 370 | The five teams of people. 371 | 372 | We had the name them and play with 373 | them and them for about an hour. 374 | 375 | Then we unveiled a him or a 376 | hatchet and we told them to 377 | 378 | torture and kill the row and then 379 | this turned out to be a little 380 | 381 | more dramatic than we expected it 382 | to be because none of the 383 | 384 | participants wouldn't even so much 385 | as straight. 386 | 387 | A robot. 388 | 389 | So we had to improvise. 390 | 391 | End at some point. 392 | 393 | He said o.k. 394 | 395 | You can save your team's robot. 396 | 397 | If you destroy another team throw. 398 | 399 | I And anyone that didn't work. 400 | 401 | They couldn't do it. 402 | 403 | So finally said, We're gonna 404 | destroy all the robots are someone 405 | 406 | takes a hatchet to one of them. 407 | 408 | This guy stood up and he took the 409 | 410 | hatchet and the whole room, 411 | Winston. 412 | 413 | See brother had to down on the 414 | robot's neck and there was this 415 | 416 | half joking. 417 | 418 | Is there reason to. 419 | 420 | For example, prevent the child 421 | from kicking about Doc That just 422 | 423 | out of respect for property 424 | because the child may be more 425 | 426 | likely to take a real dark and 427 | again. 428 | 429 | It's not just kids and this is the 430 | violent video games question, but 431 | 432 | it's a completely new level 433 | because of this visceral 434 | 435 | physicality that we respond more 436 | intensely. 437 | 438 | Two images on a screen, we behave 439 | violently towards Robarts 440 | 441 | specifically robots that are 442 | designed to mimic life is is that 443 | 444 | training cruelty muscles. 445 | 446 | The answer to this question has 447 | 448 | the potential impact human 449 | behaviour has the potential impact 450 | 451 | social norms. 452 | 453 | It has the potential to inspire 454 | 455 | rules around. 456 | 457 | What we can and can't do certain 458 | 459 | Robarts animal cruelty, because 460 | even if robots can't fuel our 461 | 462 | behaviour towards a matter for us 463 | and regardless of whether we end 464 | 465 | up changing ovals robots might be 466 | able to help us come to a new 467 | 468 | understanding of ourselves. 469 | 470 | Most of what learned over the past 471 | 472 | ten years have not been about 473 | technology. 474 | 475 | A It's been about human psychology 476 | and empathy and how we relate to 477 | 478 | others. 479 | 480 | And because when a child is kind 481 | 482 | to her room. 483 | 484 | But when a soldier tries to save a 485 | 486 | robot on the battlefield. 487 | 488 | When a group of people refuses to 489 | 490 | harm her about a baby dinosaur. 491 | 492 | Those robots aren't just motors in 493 | 494 | years and a groom's. -------------------------------------------------------------------------------- /example-output/test.csv: -------------------------------------------------------------------------------- 1 | N, In, Out, Text 2 | 1,"13.02","14.13","There is a day." 3 | 2,"13.86","16.65","About ten years ago when I asked a" 4 | 3,"16.28","19.58","friend to hold a baby dinosaur 5 | robot upside down." 6 | 4,"19.17","23.39","It was a toy called plea." 7 | 5,"23.03","48.26","All It's a super courts are" 8 | 6,"48.11","51.49","showing off to my friend and I 9 | said to hold it, but he'll see" 10 | 7,"51.22","51.79","what debts." 11 | 8,"51.66","56.92","We were watching the theatrics of" 12 | 9,"56.01","63.73","this robe that struggle and cry 13 | out and and after a few The first." 14 | 10,"63.57","67.96","After my little and I said o.k." 15 | 11,"67.87","68.9","That's enough." 16 | 12,"68.22","75.31","Now, let's put him back down and 17 | pepper, about to make it." 18 | 13,"75.04","80.65","Stop crying and I was kind of a 19 | weird experience for me one thing," 20 | 14,"79.93","83.75","wasn't the most maternal person at 21 | the time." 22 | 15,"83.38","87.62","Although, since then I've become a 23 | mother and nine months ago." 24 | 16,"87.38","91.65","And that is a score when hold them 25 | up to now, but my response to this" 26 | 17,"91.53","96.85","robot was also interesting because 27 | I knew exactly how this machine" 28 | 18,"96.57","97.7","work it." 29 | 19,"97.26","98.17","And yet." 30 | 20,"98.01","101.84","I still felt compelled to be kind 31 | to it." 32 | 21,"101.67","106.61","And that observation sparked that 33 | curiosity that I spent the decade" 34 | 22,"106.41","107.71","pursuing it." 35 | 23,"106.93","109.74","Why did they comfort this robe." 36 | 24,"109.41","116.57","One of the things I discovered was 37 | my treatment of this machine was" 38 | 25,"116.48","120.36","more than just an awkward moment 39 | in my living room that in a world" 40 | 26,"120.21","123","were increasingly integrating 41 | robots into our lives and things" 42 | 27,"122.62","127.02","like that might actually have 43 | consequences because the first" 44 | 28,"126.21","129.75","thing that I discovered is that." 45 | 29,"129.39","133.76","It's not just me in two thousand" 46 | 30,"133.68","134.02","seven." 47 | 31,"133.76","135.35","The Washington Post reported that" 48 | 32,"135.16","140.08","the United States military was 49 | testing this robot diffused" 50 | 33,"139.58","140.69","landmines." 51 | 34,"140.08","142.51","We workers were shaped like a" 52 | 35,"142.42","148.11","stick insect would walk around a 53 | minefield on its legs and every" 54 | 36,"147.74","150.1","time he stepped on a mine." 55 | 37,"149.56","152.06","One of the legs would blow up" 56 | 38,"151.9","154.83","would continue on the other legs 57 | to block your minds in the colonel" 58 | 39,"154.73","157.28","was in charge of this testing 59 | exercise for calling it off" 60 | 40,"156.93","161.03","because he says it's too inhumane 61 | to watch this damage robot drag" 62 | 41,"160.94","165.74","itself along What would cause a 63 | hardened military officer and" 64 | 42,"165.61","169.13","someone like myself to have this 65 | response to row." 66 | 43,"168.6","170.06","But what." 67 | 44,"169.6","176.4","Of course for prime for science" 68 | 45,"176.23","181.44","fiction, pop culture really want 69 | to personify these things, but it" 70 | 46,"181.29","186.09","goes a little bit deeper than that 71 | it turns out that we are" 72 | 47,"185.78","189.87","biologically hard wired to project 73 | intent and life onto any movement" 74 | 48,"189.74","190.48","in a physical space." 75 | 49,"190.34","192.81","It seems I promised us people" 76 | 50,"192.7","195.09","treat all sort of robots like 77 | their life." 78 | 51,"194.96","198.27","These bomb disposal units get 79 | names." 80 | 52,"197.69","202.37","They get medals of honour had 81 | funeral for them with gun salutes." 82 | 53,"201.92","204.95","Research shows that we do this." 83 | 54,"204.59","207.25","Even with very simple household" 84 | 55,"206.93","209.4","robots like the room." 85 | 56,"208.77","210.18","A vacuum cleaner." 86 | 57,"209.73","215.76","Just a desk that runs around the 87 | floor and clean it just the fact" 88 | 58,"215.67","219.4","that it's moving around on his own 89 | will cause people to name the" 90 | 59,"219.3","222.99","marimba and feel bad for the room." 91 | 60,"222.69","225","But when he gets stuck under the" 92 | 61,"224.83","225.1","couch." 93 | 62,"225.02","226.56","We can design about specifically" 94 | 63,"226.23","228.62","to invoke this response using eyes 95 | and faces were movement." 96 | 64,"228.43","230.29","People are magically 97 | subconsciously associate with" 98 | 65,"230.13","230.74","state of mind." 99 | 66,"230.61","231.73","There's an entire body of research" 100 | 67,"231.63","237.21","called Human robot interaction 101 | that really shows how all this" 102 | 68,"237","238.15","works so." 103 | 69,"237.78","239.33","For example." 104 | 70,"239.16","244.72","Researchers at Stamford University 105 | found out that makes people really" 106 | 71,"244.56","248.35","uncomfortable and asked them to 107 | touch her about his private parts" 108 | 72,"248.11","250.4","from this from any other studies." 109 | 73,"249.92","250.7","We know." 110 | 74,"250.61","255.32","We know that people respond to the 111 | cues given to them by the lifelike" 112 | 75,"255.1","255.66","machines." 113 | 76,"255.32","257.54","Even if they know that they're not" 114 | 77,"257.27","257.66","real." 115 | 78,"257.54","261.93","We're heading towards a world" 116 | 79,"261.63","265.25","where robots are everywhere about 117 | the technology is moving out from" 118 | 80,"265.1","267.88","behind factory was entering 119 | workplaces households and as these" 120 | 81,"267.67","268","machines." 121 | 82,"267.88","270.82","They can sense and make a ton of" 122 | 83,"270.68","275.71","my decisions and learn enter into 123 | the shared spaces." 124 | 84,"275.28","278.02","I think that maybe the best 125 | analogy." 126 | 85,"277.96","280.81","We have for this is our 127 | relationship with animals." 128 | 86,"280.26","286.63","Thousands of years ago, we started 129 | to domesticate animals and we" 130 | 87,"285.92","288.69","train them for work and weaponry 131 | and companionship." 132 | 88,"288.04","289.54","Throughout history." 133 | 89,"288.99","290.58","We've treated." 134 | 90,"290.37","293.76","Some animals like tools are the 135 | products and other animals." 136 | 91,"293.51","297.99","We treated with kindness and given 137 | a place in society as our" 138 | 92,"297.49","298.08","companions." 139 | 93,"297.99","299.76","I think it's possible." 140 | 94,"299.44","302.34","We might start to integrate 141 | Robartes, but similar weights" 142 | 95,"302.15","303.83","animals are alive." 143 | 96,"303.14","305.91","Robert and that." 144 | 97,"305.64","308.67","And I can tell you from working." 145 | 98,"307.96","311.33","What about the sister were pretty" 146 | 99,"310.99","312.79","far away from developing robots." 147 | 100,"312.61","314.24","They can feel anything there, but" 148 | 101,"314.12","317.33","we feel for And that matters 149 | because if we're trying to" 150 | 102,"317.26","325.02","integrate robots into the shared 151 | spaces need to understand that" 152 | 103,"324.57","329.07","people treat them differently than 153 | other devices that in some cases." 154 | 104,"328.94","332.04","For example, the case of a soldier 155 | who becomes emotionally attached" 156 | 105,"331.72","332.69","to the robot." 157 | 106,"332.28","334.17","They work." 158 | 107,"334.13","339.78","Well, if that can be anything from 159 | inefficient to dangerous." 160 | 108,"339.58","340.94","But in other cases." 161 | 109,"340.32","343.05","It can actually be used for the" 162 | 110,"342.96","346.6","faster this emotional connection 163 | to, but we're really seeing some" 164 | 111,"345.74","348.08","great use cases." 165 | 112,"347.77","350.39","For example, robots working with" 166 | 113,"350.1","353.1","autistic children to engage them 167 | in ways that we haven't seen" 168 | 114,"352.75","355.31","previously robot's working with 169 | teachers to engage kids and" 170 | 115,"354.95","359.94","learning with new and it's not 171 | just for kids early studies show" 172 | 116,"359.63","363.28","that we can help doctors and 173 | patients and health care settings" 174 | 117,"362.61","366.38","and this is the pirate b. b. c." 175 | 118,"366.26","368.95","But it's used in nursing homes" 176 | 119,"368.41","372.03","with dementia patients has been 177 | around for a while I remember" 178 | 120,"371.18","373.51","years ago." 179 | 121,"373.17","375.21","Being a party and telling someone" 180 | 122,"375.03","380.04","about this throwback and her 181 | response was I can't believe we're" 182 | 123,"379.75","381.75","giving people robots instead of 183 | human care." 184 | 124,"381.54","385.9","is a really common response and I 185 | think it's absolutely correct" 186 | 125,"385.74","386.91","because that would be terrible." 187 | 126,"386.76","388.05","And in this case." 188 | 127,"387.93","391.83","It's not with this robot replace 189 | it with this robot replaces his" 190 | 128,"391.31","395.73","animal therapy in context which he 191 | was real animals." 192 | 129,"395.59","405.11","We can use robots because people 193 | consistently treat them like more." 194 | 130,"405.04","407.89","More like an animal and have it 195 | acknowledging this emotional" 196 | 131,"407.54","408.49","connection." 197 | 132,"407.89","412.39","Robert, can also help us" 198 | 133,"411.68","413.17","anticipate challenges as these 199 | devices." 200 | 134,"413.01","418.46","Move into more intimate areas of 201 | people's lives and for example is" 202 | 135,"418.24","418.6","it." 203 | 136,"418.46","418.81","o.k." 204 | 137,"418.6","421.54","If your child's teddy bear robot 205 | records private conversations." 206 | 138,"421.18","422.49","Is it." 207 | 139,"422.28","422.9","o.k." 208 | 140,"422.55","427.78","If your sex robot has compelling 209 | in our purchasers because rope." 210 | 141,"427.44","430.32","That's plus capitalism equals 211 | questions around consumer" 212 | 142,"429.96","433.67","protection and privacy and those 213 | aren't the only reason, said her" 214 | 143,"433.41","437.52","behaviour around these machines 215 | could, madam." 216 | 144,"437.23","440.13","A few years after that first 217 | initial experience." 218 | 145,"439.88","443.79","I had with this baby dinosaur 219 | robot do workshop with her friend" 220 | 146,"443.74","444.8","Hannah Scott." 221 | 147,"444.23","447","Scott, then we took five of these" 222 | 148,"446.68","449.89","baby dinosaur about we give them." 223 | 149,"449.76","451.04","The five teams of people." 224 | 150,"450.59","459.52","We had the name them and play with 225 | them and them for about an hour." 226 | 151,"458.94","464.17","Then we unveiled a him or a 227 | hatchet and we told them to" 228 | 152,"464.08","471.09","torture and kill the row and then 229 | this turned out to be a little" 230 | 153,"470.7","475.29","more dramatic than we expected it 231 | to be because none of the" 232 | 154,"475.16","477.27","participants wouldn't even so much 233 | as straight." 234 | 155,"476.9","477.89","A robot." 235 | 156,"477.68","479.32","So we had to improvise." 236 | 157,"478.9","480.33","End at some point." 237 | 158,"480.2","481.08","He said o.k." 238 | 159,"480.75","483.22","You can save your team's robot." 239 | 160,"482.79","485.24","If you destroy another team throw." 240 | 161,"485.14","489.07","I And anyone that didn't work." 241 | 162,"488.8","490.06","They couldn't do it." 242 | 163,"489.81","492.1","So finally said, We're gonna 243 | destroy all the robots are someone" 244 | 164,"492.01","497.67","takes a hatchet to one of them." 245 | 165,"497.42","499.13","This guy stood up and he took the" 246 | 166,"499.01","500.3","hatchet and the whole room, 247 | Winston." 248 | 167,"500.12","504.36","See brother had to down on the 249 | robot's neck and there was this" 250 | 168,"504.21","505.11","half joking." 251 | 169,"504.76","506.26","Is there reason to." 252 | 170,"505.76","510.84","For example, prevent the child 253 | from kicking about Doc That just" 254 | 171,"510.51","514.6","out of respect for property 255 | because the child may be more" 256 | 172,"514.23","518.21","likely to take a real dark and 257 | again." 258 | 173,"517.94","522.16","It's not just kids and this is the 259 | violent video games question, but" 260 | 174,"521.94","524","it's a completely new level 261 | because of this visceral" 262 | 175,"523.72","527.05","physicality that we respond more 263 | intensely." 264 | 176,"526.83","530.52","Two images on a screen, we behave 265 | violently towards Robarts" 266 | 177,"530.09","533.99","specifically robots that are 267 | designed to mimic life is is that" 268 | 178,"533.7","534.69","training cruelty muscles." 269 | 179,"534.52","598.49","The answer to this question has" 270 | 180,"598.27","601.62","the potential impact human 271 | behaviour has the potential impact" 272 | 181,"601.3","603.51","social norms." 273 | 182,"603.2","605.53","It has the potential to inspire" 274 | 183,"604.8","606.93","rules around." 275 | 184,"606.83","608.28","What we can and can't do certain" 276 | 185,"608.07","612.38","Robarts animal cruelty, because 277 | even if robots can't fuel our" 278 | 186,"611.72","616.53","behaviour towards a matter for us 279 | and regardless of whether we end" 280 | 187,"616.43","621.74","up changing ovals robots might be 281 | able to help us come to a new" 282 | 188,"621.03","623.23","understanding of ourselves." 283 | 189,"623.15","628.09","Most of what learned over the past" 284 | 190,"627.43","630.08","ten years have not been about 285 | technology." 286 | 191,"629.95","643.48","A It's been about human psychology 287 | and empathy and how we relate to" 288 | 192,"643.29","644.1","others." 289 | 193,"643.48","646.9","And because when a child is kind" 290 | 194,"646.61","647.96","to her room." 291 | 195,"647.5","650.87","But when a soldier tries to save a" 292 | 196,"650.37","652.26","robot on the battlefield." 293 | 197,"651.93","655.32","When a group of people refuses to" 294 | 198,"655","658.68","harm her about a baby dinosaur." 295 | 199,"658.42","662.25","Those robots aren't just motors in" 296 | 200,"661.42","662.25","years and a groom's." 297 | -------------------------------------------------------------------------------- /example-output/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "There is a day.", 4 | "start": 13.02, 5 | "end": 14.13 6 | }, 7 | { 8 | "text": "About ten years ago when I asked a", 9 | "start": 13.86, 10 | "end": 16.65 11 | }, 12 | { 13 | "text": "friend to hold a baby dinosaur\nrobot upside down.", 14 | "start": 16.28, 15 | "end": 19.58 16 | }, 17 | { 18 | "text": "It was a toy called plea.", 19 | "start": 19.17, 20 | "end": 23.39 21 | }, 22 | { 23 | "text": "All It's a super courts are", 24 | "start": 23.03, 25 | "end": 48.26 26 | }, 27 | { 28 | "text": "showing off to my friend and I\nsaid to hold it, but he'll see", 29 | "start": 48.11, 30 | "end": 51.49 31 | }, 32 | { 33 | "text": "what debts.", 34 | "start": 51.22, 35 | "end": 51.79 36 | }, 37 | { 38 | "text": "We were watching the theatrics of", 39 | "start": 51.66, 40 | "end": 56.92 41 | }, 42 | { 43 | "text": "this robe that struggle and cry\nout and and after a few The first.", 44 | "start": 56.01, 45 | "end": 63.73 46 | }, 47 | { 48 | "text": "After my little and I said o.k.", 49 | "start": 63.57, 50 | "end": 67.96 51 | }, 52 | { 53 | "text": "That's enough.", 54 | "start": 67.87, 55 | "end": 68.9 56 | }, 57 | { 58 | "text": "Now, let's put him back down and\npepper, about to make it.", 59 | "start": 68.22, 60 | "end": 75.31 61 | }, 62 | { 63 | "text": "Stop crying and I was kind of a\nweird experience for me one thing,", 64 | "start": 75.04, 65 | "end": 80.65 66 | }, 67 | { 68 | "text": "wasn't the most maternal person at\nthe time.", 69 | "start": 79.93, 70 | "end": 83.75 71 | }, 72 | { 73 | "text": "Although, since then I've become a\nmother and nine months ago.", 74 | "start": 83.38, 75 | "end": 87.62 76 | }, 77 | { 78 | "text": "And that is a score when hold them\nup to now, but my response to this", 79 | "start": 87.38, 80 | "end": 91.65 81 | }, 82 | { 83 | "text": "robot was also interesting because\nI knew exactly how this machine", 84 | "start": 91.53, 85 | "end": 96.85 86 | }, 87 | { 88 | "text": "work it.", 89 | "start": 96.57, 90 | "end": 97.7 91 | }, 92 | { 93 | "text": "And yet.", 94 | "start": 97.26, 95 | "end": 98.17 96 | }, 97 | { 98 | "text": "I still felt compelled to be kind\nto it.", 99 | "start": 98.01, 100 | "end": 101.84 101 | }, 102 | { 103 | "text": "And that observation sparked that\ncuriosity that I spent the decade", 104 | "start": 101.67, 105 | "end": 106.61 106 | }, 107 | { 108 | "text": "pursuing it.", 109 | "start": 106.41, 110 | "end": 107.71 111 | }, 112 | { 113 | "text": "Why did they comfort this robe.", 114 | "start": 106.93, 115 | "end": 109.74 116 | }, 117 | { 118 | "text": "One of the things I discovered was\nmy treatment of this machine was", 119 | "start": 109.41, 120 | "end": 116.57 121 | }, 122 | { 123 | "text": "more than just an awkward moment\nin my living room that in a world", 124 | "start": 116.48, 125 | "end": 120.36 126 | }, 127 | { 128 | "text": "were increasingly integrating\nrobots into our lives and things", 129 | "start": 120.21, 130 | "end": 123 131 | }, 132 | { 133 | "text": "like that might actually have\nconsequences because the first", 134 | "start": 122.62, 135 | "end": 127.02 136 | }, 137 | { 138 | "text": "thing that I discovered is that.", 139 | "start": 126.21, 140 | "end": 129.75 141 | }, 142 | { 143 | "text": "It's not just me in two thousand", 144 | "start": 129.39, 145 | "end": 133.76 146 | }, 147 | { 148 | "text": "seven.", 149 | "start": 133.68, 150 | "end": 134.02 151 | }, 152 | { 153 | "text": "The Washington Post reported that", 154 | "start": 133.76, 155 | "end": 135.35 156 | }, 157 | { 158 | "text": "the United States military was\ntesting this robot diffused", 159 | "start": 135.16, 160 | "end": 140.08 161 | }, 162 | { 163 | "text": "landmines.", 164 | "start": 139.58, 165 | "end": 140.69 166 | }, 167 | { 168 | "text": "We workers were shaped like a", 169 | "start": 140.08, 170 | "end": 142.51 171 | }, 172 | { 173 | "text": "stick insect would walk around a\nminefield on its legs and every", 174 | "start": 142.42, 175 | "end": 148.11 176 | }, 177 | { 178 | "text": "time he stepped on a mine.", 179 | "start": 147.74, 180 | "end": 150.1 181 | }, 182 | { 183 | "text": "One of the legs would blow up", 184 | "start": 149.56, 185 | "end": 152.06 186 | }, 187 | { 188 | "text": "would continue on the other legs\nto block your minds in the colonel", 189 | "start": 151.9, 190 | "end": 154.83 191 | }, 192 | { 193 | "text": "was in charge of this testing\nexercise for calling it off", 194 | "start": 154.73, 195 | "end": 157.28 196 | }, 197 | { 198 | "text": "because he says it's too inhumane\nto watch this damage robot drag", 199 | "start": 156.93, 200 | "end": 161.03 201 | }, 202 | { 203 | "text": "itself along What would cause a\nhardened military officer and", 204 | "start": 160.94, 205 | "end": 165.74 206 | }, 207 | { 208 | "text": "someone like myself to have this\nresponse to row.", 209 | "start": 165.61, 210 | "end": 169.13 211 | }, 212 | { 213 | "text": "But what.", 214 | "start": 168.6, 215 | "end": 170.06 216 | }, 217 | { 218 | "text": "Of course for prime for science", 219 | "start": 169.6, 220 | "end": 176.4 221 | }, 222 | { 223 | "text": "fiction, pop culture really want\nto personify these things, but it", 224 | "start": 176.23, 225 | "end": 181.44 226 | }, 227 | { 228 | "text": "goes a little bit deeper than that\nit turns out that we are", 229 | "start": 181.29, 230 | "end": 186.09 231 | }, 232 | { 233 | "text": "biologically hard wired to project\nintent and life onto any movement", 234 | "start": 185.78, 235 | "end": 189.87 236 | }, 237 | { 238 | "text": "in a physical space.", 239 | "start": 189.74, 240 | "end": 190.48 241 | }, 242 | { 243 | "text": "It seems I promised us people", 244 | "start": 190.34, 245 | "end": 192.81 246 | }, 247 | { 248 | "text": "treat all sort of robots like\ntheir life.", 249 | "start": 192.7, 250 | "end": 195.09 251 | }, 252 | { 253 | "text": "These bomb disposal units get\nnames.", 254 | "start": 194.96, 255 | "end": 198.27 256 | }, 257 | { 258 | "text": "They get medals of honour had\nfuneral for them with gun salutes.", 259 | "start": 197.69, 260 | "end": 202.37 261 | }, 262 | { 263 | "text": "Research shows that we do this.", 264 | "start": 201.92, 265 | "end": 204.95 266 | }, 267 | { 268 | "text": "Even with very simple household", 269 | "start": 204.59, 270 | "end": 207.25 271 | }, 272 | { 273 | "text": "robots like the room.", 274 | "start": 206.93, 275 | "end": 209.4 276 | }, 277 | { 278 | "text": "A vacuum cleaner.", 279 | "start": 208.77, 280 | "end": 210.18 281 | }, 282 | { 283 | "text": "Just a desk that runs around the\nfloor and clean it just the fact", 284 | "start": 209.73, 285 | "end": 215.76 286 | }, 287 | { 288 | "text": "that it's moving around on his own\nwill cause people to name the", 289 | "start": 215.67, 290 | "end": 219.4 291 | }, 292 | { 293 | "text": "marimba and feel bad for the room.", 294 | "start": 219.3, 295 | "end": 222.99 296 | }, 297 | { 298 | "text": "But when he gets stuck under the", 299 | "start": 222.69, 300 | "end": 225 301 | }, 302 | { 303 | "text": "couch.", 304 | "start": 224.83, 305 | "end": 225.1 306 | }, 307 | { 308 | "text": "We can design about specifically", 309 | "start": 225.02, 310 | "end": 226.56 311 | }, 312 | { 313 | "text": "to invoke this response using eyes\nand faces were movement.", 314 | "start": 226.23, 315 | "end": 228.62 316 | }, 317 | { 318 | "text": "People are magically\nsubconsciously associate with", 319 | "start": 228.43, 320 | "end": 230.29 321 | }, 322 | { 323 | "text": "state of mind.", 324 | "start": 230.13, 325 | "end": 230.74 326 | }, 327 | { 328 | "text": "There's an entire body of research", 329 | "start": 230.61, 330 | "end": 231.73 331 | }, 332 | { 333 | "text": "called Human robot interaction\nthat really shows how all this", 334 | "start": 231.63, 335 | "end": 237.21 336 | }, 337 | { 338 | "text": "works so.", 339 | "start": 237, 340 | "end": 238.15 341 | }, 342 | { 343 | "text": "For example.", 344 | "start": 237.78, 345 | "end": 239.33 346 | }, 347 | { 348 | "text": "Researchers at Stamford University\nfound out that makes people really", 349 | "start": 239.16, 350 | "end": 244.72 351 | }, 352 | { 353 | "text": "uncomfortable and asked them to\ntouch her about his private parts", 354 | "start": 244.56, 355 | "end": 248.35 356 | }, 357 | { 358 | "text": "from this from any other studies.", 359 | "start": 248.11, 360 | "end": 250.4 361 | }, 362 | { 363 | "text": "We know.", 364 | "start": 249.92, 365 | "end": 250.7 366 | }, 367 | { 368 | "text": "We know that people respond to the\ncues given to them by the lifelike", 369 | "start": 250.61, 370 | "end": 255.32 371 | }, 372 | { 373 | "text": "machines.", 374 | "start": 255.1, 375 | "end": 255.66 376 | }, 377 | { 378 | "text": "Even if they know that they're not", 379 | "start": 255.32, 380 | "end": 257.54 381 | }, 382 | { 383 | "text": "real.", 384 | "start": 257.27, 385 | "end": 257.66 386 | }, 387 | { 388 | "text": "We're heading towards a world", 389 | "start": 257.54, 390 | "end": 261.93 391 | }, 392 | { 393 | "text": "where robots are everywhere about\nthe technology is moving out from", 394 | "start": 261.63, 395 | "end": 265.25 396 | }, 397 | { 398 | "text": "behind factory was entering\nworkplaces households and as these", 399 | "start": 265.1, 400 | "end": 267.88 401 | }, 402 | { 403 | "text": "machines.", 404 | "start": 267.67, 405 | "end": 268 406 | }, 407 | { 408 | "text": "They can sense and make a ton of", 409 | "start": 267.88, 410 | "end": 270.82 411 | }, 412 | { 413 | "text": "my decisions and learn enter into\nthe shared spaces.", 414 | "start": 270.68, 415 | "end": 275.71 416 | }, 417 | { 418 | "text": "I think that maybe the best\nanalogy.", 419 | "start": 275.28, 420 | "end": 278.02 421 | }, 422 | { 423 | "text": "We have for this is our\nrelationship with animals.", 424 | "start": 277.96, 425 | "end": 280.81 426 | }, 427 | { 428 | "text": "Thousands of years ago, we started\nto domesticate animals and we", 429 | "start": 280.26, 430 | "end": 286.63 431 | }, 432 | { 433 | "text": "train them for work and weaponry\nand companionship.", 434 | "start": 285.92, 435 | "end": 288.69 436 | }, 437 | { 438 | "text": "Throughout history.", 439 | "start": 288.04, 440 | "end": 289.54 441 | }, 442 | { 443 | "text": "We've treated.", 444 | "start": 288.99, 445 | "end": 290.58 446 | }, 447 | { 448 | "text": "Some animals like tools are the\nproducts and other animals.", 449 | "start": 290.37, 450 | "end": 293.76 451 | }, 452 | { 453 | "text": "We treated with kindness and given\na place in society as our", 454 | "start": 293.51, 455 | "end": 297.99 456 | }, 457 | { 458 | "text": "companions.", 459 | "start": 297.49, 460 | "end": 298.08 461 | }, 462 | { 463 | "text": "I think it's possible.", 464 | "start": 297.99, 465 | "end": 299.76 466 | }, 467 | { 468 | "text": "We might start to integrate\nRobartes, but similar weights", 469 | "start": 299.44, 470 | "end": 302.34 471 | }, 472 | { 473 | "text": "animals are alive.", 474 | "start": 302.15, 475 | "end": 303.83 476 | }, 477 | { 478 | "text": "Robert and that.", 479 | "start": 303.14, 480 | "end": 305.91 481 | }, 482 | { 483 | "text": "And I can tell you from working.", 484 | "start": 305.64, 485 | "end": 308.67 486 | }, 487 | { 488 | "text": "What about the sister were pretty", 489 | "start": 307.96, 490 | "end": 311.33 491 | }, 492 | { 493 | "text": "far away from developing robots.", 494 | "start": 310.99, 495 | "end": 312.79 496 | }, 497 | { 498 | "text": "They can feel anything there, but", 499 | "start": 312.61, 500 | "end": 314.24 501 | }, 502 | { 503 | "text": "we feel for And that matters\nbecause if we're trying to", 504 | "start": 314.12, 505 | "end": 317.33 506 | }, 507 | { 508 | "text": "integrate robots into the shared\nspaces need to understand that", 509 | "start": 317.26, 510 | "end": 325.02 511 | }, 512 | { 513 | "text": "people treat them differently than\nother devices that in some cases.", 514 | "start": 324.57, 515 | "end": 329.07 516 | }, 517 | { 518 | "text": "For example, the case of a soldier\nwho becomes emotionally attached", 519 | "start": 328.94, 520 | "end": 332.04 521 | }, 522 | { 523 | "text": "to the robot.", 524 | "start": 331.72, 525 | "end": 332.69 526 | }, 527 | { 528 | "text": "They work.", 529 | "start": 332.28, 530 | "end": 334.17 531 | }, 532 | { 533 | "text": "Well, if that can be anything from\ninefficient to dangerous.", 534 | "start": 334.13, 535 | "end": 339.78 536 | }, 537 | { 538 | "text": "But in other cases.", 539 | "start": 339.58, 540 | "end": 340.94 541 | }, 542 | { 543 | "text": "It can actually be used for the", 544 | "start": 340.32, 545 | "end": 343.05 546 | }, 547 | { 548 | "text": "faster this emotional connection\nto, but we're really seeing some", 549 | "start": 342.96, 550 | "end": 346.6 551 | }, 552 | { 553 | "text": "great use cases.", 554 | "start": 345.74, 555 | "end": 348.08 556 | }, 557 | { 558 | "text": "For example, robots working with", 559 | "start": 347.77, 560 | "end": 350.39 561 | }, 562 | { 563 | "text": "autistic children to engage them\nin ways that we haven't seen", 564 | "start": 350.1, 565 | "end": 353.1 566 | }, 567 | { 568 | "text": "previously robot's working with\nteachers to engage kids and", 569 | "start": 352.75, 570 | "end": 355.31 571 | }, 572 | { 573 | "text": "learning with new and it's not\njust for kids early studies show", 574 | "start": 354.95, 575 | "end": 359.94 576 | }, 577 | { 578 | "text": "that we can help doctors and\npatients and health care settings", 579 | "start": 359.63, 580 | "end": 363.28 581 | }, 582 | { 583 | "text": "and this is the pirate b. b. c.", 584 | "start": 362.61, 585 | "end": 366.38 586 | }, 587 | { 588 | "text": "But it's used in nursing homes", 589 | "start": 366.26, 590 | "end": 368.95 591 | }, 592 | { 593 | "text": "with dementia patients has been\naround for a while I remember", 594 | "start": 368.41, 595 | "end": 372.03 596 | }, 597 | { 598 | "text": "years ago.", 599 | "start": 371.18, 600 | "end": 373.51 601 | }, 602 | { 603 | "text": "Being a party and telling someone", 604 | "start": 373.17, 605 | "end": 375.21 606 | }, 607 | { 608 | "text": "about this throwback and her\nresponse was I can't believe we're", 609 | "start": 375.03, 610 | "end": 380.04 611 | }, 612 | { 613 | "text": "giving people robots instead of\nhuman care.", 614 | "start": 379.75, 615 | "end": 381.75 616 | }, 617 | { 618 | "text": "is a really common response and I\nthink it's absolutely correct", 619 | "start": 381.54, 620 | "end": 385.9 621 | }, 622 | { 623 | "text": "because that would be terrible.", 624 | "start": 385.74, 625 | "end": 386.91 626 | }, 627 | { 628 | "text": "And in this case.", 629 | "start": 386.76, 630 | "end": 388.05 631 | }, 632 | { 633 | "text": "It's not with this robot replace\nit with this robot replaces his", 634 | "start": 387.93, 635 | "end": 391.83 636 | }, 637 | { 638 | "text": "animal therapy in context which he\nwas real animals.", 639 | "start": 391.31, 640 | "end": 395.73 641 | }, 642 | { 643 | "text": "We can use robots because people\nconsistently treat them like more.", 644 | "start": 395.59, 645 | "end": 405.11 646 | }, 647 | { 648 | "text": "More like an animal and have it\nacknowledging this emotional", 649 | "start": 405.04, 650 | "end": 407.89 651 | }, 652 | { 653 | "text": "connection.", 654 | "start": 407.54, 655 | "end": 408.49 656 | }, 657 | { 658 | "text": "Robert, can also help us", 659 | "start": 407.89, 660 | "end": 412.39 661 | }, 662 | { 663 | "text": "anticipate challenges as these\ndevices.", 664 | "start": 411.68, 665 | "end": 413.17 666 | }, 667 | { 668 | "text": "Move into more intimate areas of\npeople's lives and for example is", 669 | "start": 413.01, 670 | "end": 418.46 671 | }, 672 | { 673 | "text": "it.", 674 | "start": 418.24, 675 | "end": 418.6 676 | }, 677 | { 678 | "text": "o.k.", 679 | "start": 418.46, 680 | "end": 418.81 681 | }, 682 | { 683 | "text": "If your child's teddy bear robot\nrecords private conversations.", 684 | "start": 418.6, 685 | "end": 421.54 686 | }, 687 | { 688 | "text": "Is it.", 689 | "start": 421.18, 690 | "end": 422.49 691 | }, 692 | { 693 | "text": "o.k.", 694 | "start": 422.28, 695 | "end": 422.9 696 | }, 697 | { 698 | "text": "If your sex robot has compelling\nin our purchasers because rope.", 699 | "start": 422.55, 700 | "end": 427.78 701 | }, 702 | { 703 | "text": "That's plus capitalism equals\nquestions around consumer", 704 | "start": 427.44, 705 | "end": 430.32 706 | }, 707 | { 708 | "text": "protection and privacy and those\naren't the only reason, said her", 709 | "start": 429.96, 710 | "end": 433.67 711 | }, 712 | { 713 | "text": "behaviour around these machines\ncould, madam.", 714 | "start": 433.41, 715 | "end": 437.52 716 | }, 717 | { 718 | "text": "A few years after that first\ninitial experience.", 719 | "start": 437.23, 720 | "end": 440.13 721 | }, 722 | { 723 | "text": "I had with this baby dinosaur\nrobot do workshop with her friend", 724 | "start": 439.88, 725 | "end": 443.79 726 | }, 727 | { 728 | "text": "Hannah Scott.", 729 | "start": 443.74, 730 | "end": 444.8 731 | }, 732 | { 733 | "text": "Scott, then we took five of these", 734 | "start": 444.23, 735 | "end": 447 736 | }, 737 | { 738 | "text": "baby dinosaur about we give them.", 739 | "start": 446.68, 740 | "end": 449.89 741 | }, 742 | { 743 | "text": "The five teams of people.", 744 | "start": 449.76, 745 | "end": 451.04 746 | }, 747 | { 748 | "text": "We had the name them and play with\nthem and them for about an hour.", 749 | "start": 450.59, 750 | "end": 459.52 751 | }, 752 | { 753 | "text": "Then we unveiled a him or a\nhatchet and we told them to", 754 | "start": 458.94, 755 | "end": 464.17 756 | }, 757 | { 758 | "text": "torture and kill the row and then\nthis turned out to be a little", 759 | "start": 464.08, 760 | "end": 471.09 761 | }, 762 | { 763 | "text": "more dramatic than we expected it\nto be because none of the", 764 | "start": 470.7, 765 | "end": 475.29 766 | }, 767 | { 768 | "text": "participants wouldn't even so much\nas straight.", 769 | "start": 475.16, 770 | "end": 477.27 771 | }, 772 | { 773 | "text": "A robot.", 774 | "start": 476.9, 775 | "end": 477.89 776 | }, 777 | { 778 | "text": "So we had to improvise.", 779 | "start": 477.68, 780 | "end": 479.32 781 | }, 782 | { 783 | "text": "End at some point.", 784 | "start": 478.9, 785 | "end": 480.33 786 | }, 787 | { 788 | "text": "He said o.k.", 789 | "start": 480.2, 790 | "end": 481.08 791 | }, 792 | { 793 | "text": "You can save your team's robot.", 794 | "start": 480.75, 795 | "end": 483.22 796 | }, 797 | { 798 | "text": "If you destroy another team throw.", 799 | "start": 482.79, 800 | "end": 485.24 801 | }, 802 | { 803 | "text": "I And anyone that didn't work.", 804 | "start": 485.14, 805 | "end": 489.07 806 | }, 807 | { 808 | "text": "They couldn't do it.", 809 | "start": 488.8, 810 | "end": 490.06 811 | }, 812 | { 813 | "text": "So finally said, We're gonna\ndestroy all the robots are someone", 814 | "start": 489.81, 815 | "end": 492.1 816 | }, 817 | { 818 | "text": "takes a hatchet to one of them.", 819 | "start": 492.01, 820 | "end": 497.67 821 | }, 822 | { 823 | "text": "This guy stood up and he took the", 824 | "start": 497.42, 825 | "end": 499.13 826 | }, 827 | { 828 | "text": "hatchet and the whole room,\nWinston.", 829 | "start": 499.01, 830 | "end": 500.3 831 | }, 832 | { 833 | "text": "See brother had to down on the\nrobot's neck and there was this", 834 | "start": 500.12, 835 | "end": 504.36 836 | }, 837 | { 838 | "text": "half joking.", 839 | "start": 504.21, 840 | "end": 505.11 841 | }, 842 | { 843 | "text": "Is there reason to.", 844 | "start": 504.76, 845 | "end": 506.26 846 | }, 847 | { 848 | "text": "For example, prevent the child\nfrom kicking about Doc That just", 849 | "start": 505.76, 850 | "end": 510.84 851 | }, 852 | { 853 | "text": "out of respect for property\nbecause the child may be more", 854 | "start": 510.51, 855 | "end": 514.6 856 | }, 857 | { 858 | "text": "likely to take a real dark and\nagain.", 859 | "start": 514.23, 860 | "end": 518.21 861 | }, 862 | { 863 | "text": "It's not just kids and this is the\nviolent video games question, but", 864 | "start": 517.94, 865 | "end": 522.16 866 | }, 867 | { 868 | "text": "it's a completely new level\nbecause of this visceral", 869 | "start": 521.94, 870 | "end": 524 871 | }, 872 | { 873 | "text": "physicality that we respond more\nintensely.", 874 | "start": 523.72, 875 | "end": 527.05 876 | }, 877 | { 878 | "text": "Two images on a screen, we behave\nviolently towards Robarts", 879 | "start": 526.83, 880 | "end": 530.52 881 | }, 882 | { 883 | "text": "specifically robots that are\ndesigned to mimic life is is that", 884 | "start": 530.09, 885 | "end": 533.99 886 | }, 887 | { 888 | "text": "training cruelty muscles.", 889 | "start": 533.7, 890 | "end": 534.69 891 | }, 892 | { 893 | "text": "The answer to this question has", 894 | "start": 534.52, 895 | "end": 598.49 896 | }, 897 | { 898 | "text": "the potential impact human\nbehaviour has the potential impact", 899 | "start": 598.27, 900 | "end": 601.62 901 | }, 902 | { 903 | "text": "social norms.", 904 | "start": 601.3, 905 | "end": 603.51 906 | }, 907 | { 908 | "text": "It has the potential to inspire", 909 | "start": 603.2, 910 | "end": 605.53 911 | }, 912 | { 913 | "text": "rules around.", 914 | "start": 604.8, 915 | "end": 606.93 916 | }, 917 | { 918 | "text": "What we can and can't do certain", 919 | "start": 606.83, 920 | "end": 608.28 921 | }, 922 | { 923 | "text": "Robarts animal cruelty, because\neven if robots can't fuel our", 924 | "start": 608.07, 925 | "end": 612.38 926 | }, 927 | { 928 | "text": "behaviour towards a matter for us\nand regardless of whether we end", 929 | "start": 611.72, 930 | "end": 616.53 931 | }, 932 | { 933 | "text": "up changing ovals robots might be\nable to help us come to a new", 934 | "start": 616.43, 935 | "end": 621.74 936 | }, 937 | { 938 | "text": "understanding of ourselves.", 939 | "start": 621.03, 940 | "end": 623.23 941 | }, 942 | { 943 | "text": "Most of what learned over the past", 944 | "start": 623.15, 945 | "end": 628.09 946 | }, 947 | { 948 | "text": "ten years have not been about\ntechnology.", 949 | "start": 627.43, 950 | "end": 630.08 951 | }, 952 | { 953 | "text": "A It's been about human psychology\nand empathy and how we relate to", 954 | "start": 629.95, 955 | "end": 643.48 956 | }, 957 | { 958 | "text": "others.", 959 | "start": 643.29, 960 | "end": 644.1 961 | }, 962 | { 963 | "text": "And because when a child is kind", 964 | "start": 643.48, 965 | "end": 646.9 966 | }, 967 | { 968 | "text": "to her room.", 969 | "start": 646.61, 970 | "end": 647.96 971 | }, 972 | { 973 | "text": "But when a soldier tries to save a", 974 | "start": 647.5, 975 | "end": 650.87 976 | }, 977 | { 978 | "text": "robot on the battlefield.", 979 | "start": 650.37, 980 | "end": 652.26 981 | }, 982 | { 983 | "text": "When a group of people refuses to", 984 | "start": 651.93, 985 | "end": 655.32 986 | }, 987 | { 988 | "text": "harm her about a baby dinosaur.", 989 | "start": 655, 990 | "end": 658.68 991 | }, 992 | { 993 | "text": "Those robots aren't just motors in", 994 | "start": 658.42, 995 | "end": 662.25 996 | }, 997 | { 998 | "text": "years and a groom's.", 999 | "start": 661.42, 1000 | "end": 662.25 1001 | } 1002 | ] -------------------------------------------------------------------------------- /example-output/test.txt: -------------------------------------------------------------------------------- 1 | There is a day. 2 | 3 | About ten years ago when I asked a 4 | 5 | friend to hold a baby dinosaur 6 | robot upside down. 7 | 8 | It was a toy called plea. 9 | 10 | All It's a super courts are 11 | 12 | showing off to my friend and I 13 | said to hold it, but he'll see 14 | 15 | what debts. 16 | 17 | We were watching the theatrics of 18 | 19 | this robe that struggle and cry 20 | out and and after a few The first. 21 | 22 | After my little and I said o.k. 23 | 24 | That's enough. 25 | 26 | Now, let's put him back down and 27 | pepper, about to make it. 28 | 29 | Stop crying and I was kind of a 30 | weird experience for me one thing, 31 | 32 | wasn't the most maternal person at 33 | the time. 34 | 35 | Although, since then I've become a 36 | mother and nine months ago. 37 | 38 | And that is a score when hold them 39 | up to now, but my response to this 40 | 41 | robot was also interesting because 42 | I knew exactly how this machine 43 | 44 | work it. 45 | 46 | And yet. 47 | 48 | I still felt compelled to be kind 49 | to it. 50 | 51 | And that observation sparked that 52 | curiosity that I spent the decade 53 | 54 | pursuing it. 55 | 56 | Why did they comfort this robe. 57 | 58 | One of the things I discovered was 59 | my treatment of this machine was 60 | 61 | more than just an awkward moment 62 | in my living room that in a world 63 | 64 | were increasingly integrating 65 | robots into our lives and things 66 | 67 | like that might actually have 68 | consequences because the first 69 | 70 | thing that I discovered is that. 71 | 72 | It's not just me in two thousand 73 | 74 | seven. 75 | 76 | The Washington Post reported that 77 | 78 | the United States military was 79 | testing this robot diffused 80 | 81 | landmines. 82 | 83 | We workers were shaped like a 84 | 85 | stick insect would walk around a 86 | minefield on its legs and every 87 | 88 | time he stepped on a mine. 89 | 90 | One of the legs would blow up 91 | 92 | would continue on the other legs 93 | to block your minds in the colonel 94 | 95 | was in charge of this testing 96 | exercise for calling it off 97 | 98 | because he says it's too inhumane 99 | to watch this damage robot drag 100 | 101 | itself along What would cause a 102 | hardened military officer and 103 | 104 | someone like myself to have this 105 | response to row. 106 | 107 | But what. 108 | 109 | Of course for prime for science 110 | 111 | fiction, pop culture really want 112 | to personify these things, but it 113 | 114 | goes a little bit deeper than that 115 | it turns out that we are 116 | 117 | biologically hard wired to project 118 | intent and life onto any movement 119 | 120 | in a physical space. 121 | 122 | It seems I promised us people 123 | 124 | treat all sort of robots like 125 | their life. 126 | 127 | These bomb disposal units get 128 | names. 129 | 130 | They get medals of honour had 131 | funeral for them with gun salutes. 132 | 133 | Research shows that we do this. 134 | 135 | Even with very simple household 136 | 137 | robots like the room. 138 | 139 | A vacuum cleaner. 140 | 141 | Just a desk that runs around the 142 | floor and clean it just the fact 143 | 144 | that it's moving around on his own 145 | will cause people to name the 146 | 147 | marimba and feel bad for the room. 148 | 149 | But when he gets stuck under the 150 | 151 | couch. 152 | 153 | We can design about specifically 154 | 155 | to invoke this response using eyes 156 | and faces were movement. 157 | 158 | People are magically 159 | subconsciously associate with 160 | 161 | state of mind. 162 | 163 | There's an entire body of research 164 | 165 | called Human robot interaction 166 | that really shows how all this 167 | 168 | works so. 169 | 170 | For example. 171 | 172 | Researchers at Stamford University 173 | found out that makes people really 174 | 175 | uncomfortable and asked them to 176 | touch her about his private parts 177 | 178 | from this from any other studies. 179 | 180 | We know. 181 | 182 | We know that people respond to the 183 | cues given to them by the lifelike 184 | 185 | machines. 186 | 187 | Even if they know that they're not 188 | 189 | real. 190 | 191 | We're heading towards a world 192 | 193 | where robots are everywhere about 194 | the technology is moving out from 195 | 196 | behind factory was entering 197 | workplaces households and as these 198 | 199 | machines. 200 | 201 | They can sense and make a ton of 202 | 203 | my decisions and learn enter into 204 | the shared spaces. 205 | 206 | I think that maybe the best 207 | analogy. 208 | 209 | We have for this is our 210 | relationship with animals. 211 | 212 | Thousands of years ago, we started 213 | to domesticate animals and we 214 | 215 | train them for work and weaponry 216 | and companionship. 217 | 218 | Throughout history. 219 | 220 | We've treated. 221 | 222 | Some animals like tools are the 223 | products and other animals. 224 | 225 | We treated with kindness and given 226 | a place in society as our 227 | 228 | companions. 229 | 230 | I think it's possible. 231 | 232 | We might start to integrate 233 | Robartes, but similar weights 234 | 235 | animals are alive. 236 | 237 | Robert and that. 238 | 239 | And I can tell you from working. 240 | 241 | What about the sister were pretty 242 | 243 | far away from developing robots. 244 | 245 | They can feel anything there, but 246 | 247 | we feel for And that matters 248 | because if we're trying to 249 | 250 | integrate robots into the shared 251 | spaces need to understand that 252 | 253 | people treat them differently than 254 | other devices that in some cases. 255 | 256 | For example, the case of a soldier 257 | who becomes emotionally attached 258 | 259 | to the robot. 260 | 261 | They work. 262 | 263 | Well, if that can be anything from 264 | inefficient to dangerous. 265 | 266 | But in other cases. 267 | 268 | It can actually be used for the 269 | 270 | faster this emotional connection 271 | to, but we're really seeing some 272 | 273 | great use cases. 274 | 275 | For example, robots working with 276 | 277 | autistic children to engage them 278 | in ways that we haven't seen 279 | 280 | previously robot's working with 281 | teachers to engage kids and 282 | 283 | learning with new and it's not 284 | just for kids early studies show 285 | 286 | that we can help doctors and 287 | patients and health care settings 288 | 289 | and this is the pirate b. b. c. 290 | 291 | But it's used in nursing homes 292 | 293 | with dementia patients has been 294 | around for a while I remember 295 | 296 | years ago. 297 | 298 | Being a party and telling someone 299 | 300 | about this throwback and her 301 | response was I can't believe we're 302 | 303 | giving people robots instead of 304 | human care. 305 | 306 | is a really common response and I 307 | think it's absolutely correct 308 | 309 | because that would be terrible. 310 | 311 | And in this case. 312 | 313 | It's not with this robot replace 314 | it with this robot replaces his 315 | 316 | animal therapy in context which he 317 | was real animals. 318 | 319 | We can use robots because people 320 | consistently treat them like more. 321 | 322 | More like an animal and have it 323 | acknowledging this emotional 324 | 325 | connection. 326 | 327 | Robert, can also help us 328 | 329 | anticipate challenges as these 330 | devices. 331 | 332 | Move into more intimate areas of 333 | people's lives and for example is 334 | 335 | it. 336 | 337 | o.k. 338 | 339 | If your child's teddy bear robot 340 | records private conversations. 341 | 342 | Is it. 343 | 344 | o.k. 345 | 346 | If your sex robot has compelling 347 | in our purchasers because rope. 348 | 349 | That's plus capitalism equals 350 | questions around consumer 351 | 352 | protection and privacy and those 353 | aren't the only reason, said her 354 | 355 | behaviour around these machines 356 | could, madam. 357 | 358 | A few years after that first 359 | initial experience. 360 | 361 | I had with this baby dinosaur 362 | robot do workshop with her friend 363 | 364 | Hannah Scott. 365 | 366 | Scott, then we took five of these 367 | 368 | baby dinosaur about we give them. 369 | 370 | The five teams of people. 371 | 372 | We had the name them and play with 373 | them and them for about an hour. 374 | 375 | Then we unveiled a him or a 376 | hatchet and we told them to 377 | 378 | torture and kill the row and then 379 | this turned out to be a little 380 | 381 | more dramatic than we expected it 382 | to be because none of the 383 | 384 | participants wouldn't even so much 385 | as straight. 386 | 387 | A robot. 388 | 389 | So we had to improvise. 390 | 391 | End at some point. 392 | 393 | He said o.k. 394 | 395 | You can save your team's robot. 396 | 397 | If you destroy another team throw. 398 | 399 | I And anyone that didn't work. 400 | 401 | They couldn't do it. 402 | 403 | So finally said, We're gonna 404 | destroy all the robots are someone 405 | 406 | takes a hatchet to one of them. 407 | 408 | This guy stood up and he took the 409 | 410 | hatchet and the whole room, 411 | Winston. 412 | 413 | See brother had to down on the 414 | robot's neck and there was this 415 | 416 | half joking. 417 | 418 | Is there reason to. 419 | 420 | For example, prevent the child 421 | from kicking about Doc That just 422 | 423 | out of respect for property 424 | because the child may be more 425 | 426 | likely to take a real dark and 427 | again. 428 | 429 | It's not just kids and this is the 430 | violent video games question, but 431 | 432 | it's a completely new level 433 | because of this visceral 434 | 435 | physicality that we respond more 436 | intensely. 437 | 438 | Two images on a screen, we behave 439 | violently towards Robarts 440 | 441 | specifically robots that are 442 | designed to mimic life is is that 443 | 444 | training cruelty muscles. 445 | 446 | The answer to this question has 447 | 448 | the potential impact human 449 | behaviour has the potential impact 450 | 451 | social norms. 452 | 453 | It has the potential to inspire 454 | 455 | rules around. 456 | 457 | What we can and can't do certain 458 | 459 | Robarts animal cruelty, because 460 | even if robots can't fuel our 461 | 462 | behaviour towards a matter for us 463 | and regardless of whether we end 464 | 465 | up changing ovals robots might be 466 | able to help us come to a new 467 | 468 | understanding of ourselves. 469 | 470 | Most of what learned over the past 471 | 472 | ten years have not been about 473 | technology. 474 | 475 | A It's been about human psychology 476 | and empathy and how we relate to 477 | 478 | others. 479 | 480 | And because when a child is kind 481 | 482 | to her room. 483 | 484 | But when a soldier tries to save a 485 | 486 | robot on the battlefield. 487 | 488 | When a group of people refuses to 489 | 490 | harm her about a baby dinosaur. 491 | 492 | Those robots aren't just motors in 493 | 494 | years and a groom's. -------------------------------------------------------------------------------- /example-usage.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import subtitlesGenerator from './src/index.js'; 3 | import transcript from './sample/words-list.sample.json'; 4 | const sampleWords = transcript.words; 5 | 6 | function getTextFromWordsList(words) { 7 | return words.map((word) => {return word.text;}).join(' '); 8 | } 9 | 10 | const plainText = getTextFromWordsList(sampleWords); 11 | 12 | const subtitlesJson = subtitlesGenerator({ words: sampleWords, type: 'json' }); 13 | const ttmlPremiere = subtitlesGenerator({ words: sampleWords, type: 'premiere' }); 14 | const ittData = subtitlesGenerator({ words: sampleWords, type: 'itt' }); 15 | const ttmlData = subtitlesGenerator({ words: sampleWords, type: 'ttml' }); 16 | const srtData = subtitlesGenerator({ words: sampleWords, type: 'srt', numberOfCharPerLine: 35 }); 17 | const vttData = subtitlesGenerator({ words: sampleWords, type: 'vtt' }); 18 | const csvData = subtitlesGenerator({ words: sampleWords, type: 'csv' }); 19 | const preSegmentTextData = subtitlesGenerator({ words: sampleWords, type: 'pre-segment-txt' }); 20 | const testTet = subtitlesGenerator({ words: plainText, type: 'txt' }); 21 | 22 | fs.writeFileSync('./example-output/test.json', JSON.stringify(subtitlesJson, null, 2)); 23 | fs.writeFileSync('./example-output/test-premiere.xml', ttmlPremiere); 24 | fs.writeFileSync('./example-output/test.itt', ittData); 25 | fs.writeFileSync('./example-output/test.ttml', ttmlData); 26 | fs.writeFileSync('./example-output/test.srt', srtData); 27 | fs.writeFileSync('./example-output/test.vtt', vttData); 28 | fs.writeFileSync('./example-output/test.csv', csvData); 29 | fs.writeFileSync('./example-output/test-presegment.txt', preSegmentTextData); 30 | fs.writeFileSync('./example-output/test.txt', testTet); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@bbc/subtitles-generator", 3 | "version": "1.0.0", 4 | "description": "A node module to generate subtitles by segmenting a list of time-coded text.", 5 | "main": "index.js", 6 | "scripts": { 7 | "lint": "npx eslint --ignore-path .eslintignore .", 8 | "lint:fix": "eslint --ignore-path .eslintignore . --fix", 9 | "test": "jest", 10 | "test:watch": "jest --watchAll", 11 | "test:ci": "jest --ci", 12 | "start": "babel-node example-usage.js", 13 | "build": "rimraf ./build && npx babel ./src --out-dir ./build && rm ./build/package.json || true && cp package.json ./build/package.json && rm ./build/README.md || true && cp README.md ./build/README.md || true", 14 | "publish:public": "npm run build && npm publish build --access public", 15 | "publish:dry:run": "npm publish --dry-run" 16 | }, 17 | "author": "", 18 | "license": "MIT", 19 | "dependencies": { 20 | "sbd": "^1.0.15", 21 | "smpte-timecode": "^1.2.3" 22 | }, 23 | "devDependencies": { 24 | "@babel/cli": "^7.4.4", 25 | "@babel/core": "^7.4.5", 26 | "@babel/node": "^7.4.5", 27 | "@babel/preset-env": "^7.4.5", 28 | "babel-eslint": "^10.0.1", 29 | "eslint": "^5.16.0", 30 | "jest": "^24.8.0", 31 | "rimraf": "^2.6.3" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/bbc/subtitles-generator/issues" 35 | }, 36 | "homepage": "https://github.com/bbc/subtitles-generator", 37 | "repository": { 38 | "type": "git", 39 | "url": "git+https://github.com/bbc/subtitles-generator.git" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/compose-subtitles/csv.js: -------------------------------------------------------------------------------- 1 | function csvGenerator(srtJsonContent) { 2 | let lines = 'N, In, Out, Text\n'; 3 | srtJsonContent.forEach((srtLineO, index) => { 4 | lines += `${ index + 1 },`; 5 | //need to surround timecodes with "\"" escaped " to escape the , for the milliseconds 6 | lines += `\"${ srtLineO.start }\",\"${ srtLineO.end }\",`; 7 | // removing line breaks and and removing " as they break the csv. 8 | // wrapping text in escaped " to escape any , for the csv. 9 | // adding carriage return \n to signal end of line in csv 10 | // Preserving line break within srt lines to allow round trip from csv back to srt file in same format. 11 | // by replacing \n with \r\n. 12 | lines += `\"${ srtLineO.text.replace(/\n/g, '\r\n') }\"\n`; 13 | }); 14 | 15 | return lines; 16 | } 17 | 18 | export default csvGenerator; -------------------------------------------------------------------------------- /src/compose-subtitles/itt.js: -------------------------------------------------------------------------------- 1 | import tcFormat from './util/tc-format.js'; 2 | import escapeText from './util/escape-text.js'; 3 | 4 | const ittGenerator = (vttJSON, lang = 'en-GB', FPS = 25) => { 5 | let ittOut = 6 | ` 7 | 19 | 20 | 21 |