http://ronallo.com/demos/webvtt-cue-settings/
https://zcorpan.github.io/live-webvtt-viewer/
2017年4月18日 星期二
2017年4月15日 星期六
JAVA Google speech recognition
private HttpURLConnection makeConnection(
URL url,
byte[] postBody,
long position,
long length,
boolean allowGzip,
boolean followRedirects) throws IOException
{
setRequestProperty
https://zh.wikipedia.org/wiki/FLAC
https://docs.python.org/2/library/subprocess.html
temp = tempfile.NamedTemporaryFile(suffix='.wav', delete=False)
https://docs.python.org/2/library/tempfile.html
URL url,
byte[] postBody,
long position,
long length,
boolean allowGzip,
boolean followRedirects) throws IOException
{
setRequestProperty
https://zh.wikipedia.org/wiki/FLAC
https://docs.python.org/2/library/subprocess.html
temp = tempfile.NamedTemporaryFile(suffix='.wav', delete=False)
https://docs.python.org/2/library/tempfile.html
tempfile.
NamedTemporaryFile
([mode='w+b'[, bufsize=-1[, suffix=''[, prefix='tmp'[, dir=None[, delete=True]]]]]])
This function operates exactly as
TemporaryFile()
does, except that the file is guaranteed to have a visible name in the file system (on Unix, the directory entry is not unlinked). That name can be retrieved from the name
attribute of the returned file-like object. Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later). If delete is true (the default), the file is deleted as soon as it is closed.
The returned object is always a file-like object whose
file
attribute is the underlying true file object. This file-like object can be used in a with
statement, just like a normal file.
New in version 2.3.
2017年4月14日 星期五
autosub
https://github.com/agermanidis/autosub#autosub--
commands:
autosub_app.py -S zh-TW -D zh-TW sea.mp4
Google 语音识别 API (Part 2)
http://blog.laobubu.net/archivers/google-speech-api-pt2
Install AutoSub Step to Step in Windows with Translate subtitle
https://github.com/agermanidis/autosub/issues/31commands:
autosub_app.py -S zh-TW -D zh-TW sea.mp4
Google 语音识别 API (Part 2)
http://blog.laobubu.net/archivers/google-speech-api-pt2
2017年4月1日 星期六
canvas
http://www.jianshu.com/p/336f90f0026f
drawRect
https://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float, float, float, float, android.graphics.Paint)
drawRect
https://developer.android.com/reference/android/graphics/Canvas.html#drawRect(float, float, float, float, android.graphics.Paint)
From the Android documentation -
protected void dispatchDraw (Canvas canvas) :
|
SimpleDecoder, textRenderer, SimpleSubtitleDecoder & WebVtt
https://www.draw.io/
A WebVTT cue timestamp consists of a U+003C LESS-THAN SIGN character (<), followed by a WebVTT timestamp representing the time that the given point in the cue becomes active, followed by a U+003E GREATER-THAN SIGN character (>). The time represented by the WebVTT timestamp must be greater than the times represented by any previous WebVTT cue timestamps in the cue, as well as greater than the cue’s start time offset, and less than the cue’s end time offset.
textLayout = new StaticLayout(cueText, textPaint, availableWidth, textAlignment, spacingMult,
spacingAdd, true);
A WebVTT cue timestamp consists of a U+003C LESS-THAN SIGN character (<), followed by a WebVTT timestamp representing the time that the given point in the cue becomes active, followed by a U+003E GREATER-THAN SIGN character (>). The time represented by the WebVTT timestamp must be greater than the times represented by any previous WebVTT cue timestamps in the cue, as well as greater than the cue’s start time offset, and less than the cue’s end time offset.
textLayout = new StaticLayout(cueText, textPaint, availableWidth, textAlignment, spacingMult,
spacingAdd, true);
訂閱:
文章 (Atom)