Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bouiboui/linear16
Converts an audio file to LINEAR16 Google-speech compatible file.
https://github.com/bouiboui/linear16
audio convert ffmpeg google linear16 speech
Last synced: 24 days ago
JSON representation
Converts an audio file to LINEAR16 Google-speech compatible file.
- Host: GitHub
- URL: https://github.com/bouiboui/linear16
- Owner: bouiboui
- Created: 2017-02-15T14:08:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T03:14:39.000Z (over 1 year ago)
- Last Synced: 2024-11-15T21:05:55.994Z (about 2 months ago)
- Topics: audio, convert, ffmpeg, google, linear16, speech
- Language: JavaScript
- Homepage: https://medium.com/cod3/convert-speech-from-an-audio-file-to-text-using-google-speech-api-b951f4032a64
- Size: 84 KB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Converts an audio file to LINEAR16 Google-speech compatible file.**
This project has only been tested with m4a but should be compatible with all supported audio formats supported by ffmpeg.
Installation
--
```node
// with yarn
yarn add linear16// with npm
npm i --save linear16
```Usage
--**With *async/await***
```js
const linear16 = require('linear16');(async () => {
const outPath = await linear16('./input.m4a', './output.wav');
console.log(outPath); // Returns the output path, ex: ./output.wav})();
```
**With named parameters**
```js
const linear16 = require('linear16');(async () => {
const outPath = await linear16({
inPath: './input.m4a',
outPath: './output.wav'
});
console.log(outPath); // Returns the output path, ex: ./output.wav})();
```
**With *then***
```js
const linear16 = require('linear16');linear16('./input.m4a', './output.wav')
.then(outPath => console.log(outPath)); // Returns the output path, ex: ./output.wav```