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


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.
New in version 2.6: The delete parameter.





http://writingminds.github.io/ffmpeg-android-java/

沒有留言:

張貼留言