Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
itri-tts-async
Advanced tools
Readme
This tool let you use Node.js to operate ITRI TTS Web service.You must register a account of the service before using this tool.
The service uses the UTF-8 format and Simple Object Access Protocol (SOAP), and provides a synthetic audio file for downloading.
When TTS converting success, you can browse the Synthetic history in offcial site.
這個工具讓你使用Node.js來操作工研院文字轉語音Web服務。在使用此工具之前,您需要註冊該服務的帳戶。
該服務使用UTF-8格式和簡單物件存取協定(SOAP),並提供用於下載的合成音頻文件。
當TTS轉換成功時,您可以在官方網站瀏覽合成歷史記錄
npm i itri-tts-async
Check out Documentation
All Method are async
function.You can use Promise.prototype.then()
, or use await
in your async
function.
Fist you must use your account to create a Promise to request SOAP Client then passing TTSClient
object :
require('dotenv').config()
const {ITRITTS} = require('itri-tts-async');
//Return Promise
let tts = ITRITTS.create(process.env.Account,process.env.Password)
tts.then((ttsClient)=>{
console.log(ttsClient)
})
//OR return TTSClient object
async function main () {
let ttsClient = await ITRITTS.create(process.env.Account,process.env.Password)
console.log(ttsClient)
}
Now you can use TTSClient
converting Text to Speech. If fulfilled, you will get TTSResult
object :
...
...
//Return Promise
tts.then((ttsClient)=>{
return ttsClient.ConvertSimple("Hello,world.我是Bruce!這是一個Node.js測試。")
}).then((ttsResult) => {
console.log(ttsResult)
})
//OR return TTSResult object
async function main () {
...
...
let ttsResult = await ttsClient.ConvertSimple("Hello,world.我是Bruce!這是一個Node.js測試。")
console.log(ttsResult)
}
If TTSResult.resultCode
is 0 (Success), use TTSResult.GetConvertStatus()
method to get TTSStatus
object :
...
...
//Return Promise
tts.then((ttsClient)=>{
return ttsClient.ConvertSimple("Hello,world.我是Bruce!這是一個Node.js測試。")
}).then((ttsResult) => {
return ttsResult.GetConvertStatus()
}).then((ttsStatus)=>{
console.log(ttsStatus)
})
//OR return TTSStatus object
async function main () {
...
...
let ttsStatus = ttsResult.GetConvertStatus()
console.log(ttsStatus)
}
if TTSStatus.statusCode
is 2 (completed), the speech file url will in TTSStatus.result
.
This tool provides TTSStatus.GetConvertStatus()
method helping you to track the status by yourself :
...
...
//Return Promise
tts.then((ttsClient)=>{
return ttsClient.ConvertSimple("Hello,world.我是Bruce!這是一個Node.js測試。")
}).then((ttsResult) => {
return ttsResult.GetConvertStatus()
}).then((ttsStatus)=>{
console.log(ttsStatus)
return ttsStatus.GetConvertStatus()
}).then((newStatus)=>{
console.log(newStatus)
})
//OR return TTSStatus object
async function main () {
...
...
let newStatus = ttsStatus.GetConvertStatus()
console.log(newStatus)
}
FAQs
This tool let you use Node.js to operate ITRI TTS Web service.
The npm package itri-tts-async receives a total of 0 weekly downloads. As such, itri-tts-async popularity was classified as not popular.
We found that itri-tts-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.