• Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    Objective-C
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generating subtitles for a video in realtime using SFSpeechRecognizer

This is a somewhat modified sample code from session 509 WWDC 2016 on speech recognition

The goal of this demo is to generate real time subtitles by recognizing the audio feed from the video while playing it back.

Important notes

  1. Try running on device if you see no output in simulator

  2. While I used this video from Realm Live as a sample, all copyrights belong to their respective owners. It was the video I saw on Twitter when I came up with this idea, plus it has a clear audio track (kudos to Chris) which makes it easier to recognize speech. Also sorry for the video asset, it is quite big - 23Mb.

  3. Recognition is happening locally on device every time you are playing video, so it might be good if you are broadcasting a live interview, but probably not such a great idea if you are Netflix and can generate subtitles videos before publishing.

  4. Many thanks to engineers from AVFoundation, CoreAudio, SiriKit and SpeechRecognition teams for helping to figure out details of this demo, without them this demo would not exist! ๐Ÿ’–

  5. SFSpeechRecognizer doesn't seem to be designed with this usecase in mind, it is intended more for short interactions with your app such as a voice command or a search query dictation. It stops recognizing input over a certain duration (currently around 1 minute). In this sample I am simply re-creating recognition request every time it finishes.

  6. While most of the times recognition works fairly well, I noticed that sometimes it would lag behind the video or even gets stuck - might be quirks of the first iOS 10 beta seed or something that I messed up with implementation (while sometimes it just worksโ„ข).

  7. To conclude, while it is an amazing technology, it seems like Apple sees it as a more appropriate tool for short voice input or transcribing voice messages (like those in Whatsapp or Voice Mail app). Also I can definitely see it improving accessibility in apps like Vine (but then again, certain things are better to be done once on the server).

More Repositories

1

AdjustFontSize-Xcode-Plugin

Instant font size adjustment with control โ€“ / control +
Objective-C
271
star
2

Voltron

When UICollectionViewCell needs to be a UIViewController. WARNING: this repo is not actively maintained
Objective-C
243
star
3

BrowserTV

Turn your ๏ฃฟTV into a dashboard displaying any webpage!
Swift
226
star
4

PreciseCoverage

Make Xcode code coverage more informative
Objective-C
167
star
5

github_bus_factor

Calculate bus factor and other useful parameters for GitHub projects. Alternative to GitHub stars
Ruby
104
star
6

TouchBarLauncher

Touch Bar simulator launcher. Requires Xcode 8.1 and macOS 10.12.1
Swift
68
star
7

Tribute

Programmatic creation of NSAttributedString doesn't have to be a pain
Swift
63
star
8

LiteratureClock

Clock using time quotes from the literature, based on the work of JohannesNE
Objective-C++
62
star
9

Crash-Manager

iOS client for Crashlytics
Objective-C
25
star
10

Presentations

Various talks and corresponding sample code
Objective-C
20
star
11

Descriptive-GitHub

Safari extension adding repos descriptions to your feed
JavaScript
20
star
12

watchtower

QLPreviewController with remote URLs support
Objective-C
19
star
13

BetaWarpaint

Xcode plugin making it easier to notice when you're dealing with beta release
Objective-C
14
star
14

GitHubPR.safariextension

Safari extension for GitHub PRs; hides reviewed files, shows files changed since last review
JavaScript
13
star
15

Injector

Naive dependancy injection for Swift
Swift
9
star
16

CAEmitterLayer-scrubbing

Scrubbing through CAEmitterLayer for better control over timing of emission
Swift
7
star
17

p5swift

Like p5js, but in Swift
Swift
7
star
18

manhattan-extruded

stl model of buildings of Manhattan extruded by their heights
6
star
19

Copy

Copy a-la iOS in OS X Share menu
Swift
5
star
20

Geometry

Set of geometrical abstractions and convenience methods
Swift
4
star
21

google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Python
2
star
22

NestedKVO

Observing KVO through collections
Objective-C
2
star
23

Al-Dente

UIImage (de)serialization with no compression
Objective-C
2
star
24

re1

Swift implementation of regular expression engine re1 with generic support
Swift
2
star
25

Geppetto

Sample shortcut can be found here: https://www.icloud.com/shortcuts/91958ce97671415487d15f6751d9a149
Swift
2
star
26

AsynDisplayKit-ASImageNode-bug

Potential bug in ASImageNode
Swift
1
star
27

zats.github.io

CSS
1
star
28

Bicycle

Bicycles! Scrapers! ๐Ÿฎ๐Ÿถ Moof!
Python
1
star
29

Audrey

Swift
1
star
30

ColorPicker-macOS

Wrapper app around NSColorPanel - all built in / 3rd party color pickers at your fingertips
Swift
1
star
31

plist-bug

Bug saving to plist using Xcodeproj. Seems to be related to usage of symbols vs strings
Swift
1
star
32

hgit

Make 2-phase nature of git opt-in
Rust
1
star