node-google-tts-api
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -0,2 +1,5 @@ | ||
## 1.1.0 | ||
* Changed the concat method | ||
## 1.0.0 | ||
* Initial version |
const request = require('./request'); | ||
const text_wrap = require('./text-wrap'); | ||
const audio_concat = require('./audio-concat'); | ||
@@ -34,7 +33,7 @@ const tts_length_limit = 200; | ||
async concat(files, output) { | ||
return await audio_concat(files, output); | ||
concat(arr) { | ||
return Buffer.concat(arr); | ||
} | ||
} | ||
module.exports = googleTTS; | ||
module.exports = googleTTS; |
{ | ||
"name": "node-google-tts-api", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Simple node.js library for google text to speech", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,2 +15,4 @@ # node-google-tts-api | ||
const fs = require('fs'); | ||
tts.get({ | ||
@@ -35,13 +37,4 @@ text: "hello world", | ||
// returns array with mp3 audio src buffers | ||
let files = []; | ||
for (let i = 0; i < arr.length; i++) { | ||
let name = `./audio${i}.mp3`; | ||
fs.writeFileSync(name, arr[i]); | ||
files.push(name); | ||
} | ||
// Concat audio files | ||
tts.concat(files, "out.mp3"); | ||
tts.concat(arr); // Concat audio files | ||
fs.writeFileSync("./audio.mp3", data); | ||
}); | ||
@@ -48,0 +41,0 @@ ``` |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
3758
6
67
44