ivona node
1.0.0
مكتبة عميل العقدة ل AVONA CLEET CLOUP API. نعم ، هذا محدث ويستخدم أحدث مخطط AWS Signature 4 (بفضل AWS4). كل ما تحتاجه هو وصول IVONA الخاص بك وسرية (تلك التي تُعطى لك مرة واحدة فقط عند إنشاءها).
npm install ivona-node
لا توجد وثائق حالية ، حيث يمكن عرض مدى واجهة برمجة التطبيقات الكاملة أدناه.
var ivona = new Ivona ( {
accessKey : 'IVONA_ACCESS_KEY' ,
secretKey : 'IVONA_SECRET_KEY'
} ) ;
ivona . listVoices ( )
. on ( 'complete' , function ( voices ) {
console . log ( voices ) ;
} ) ;
// ivona.createVoice(text, config)
// [string] text - the text to be spoken
// [object] config (optional) - override Ivona request via 'body' value
ivona . createVoice ( 'This is the text that will be spoken.' , {
body : {
voice : {
name : 'Salli' ,
language : 'en-US' ,
gender : 'Female'
}
}
} ) . pipe ( fs . createWriteStream ( 'text.mp3' ) ) ; var ivona = new Ivona ( {
accessKey : 'IVONA_ACCESS_KEY' ,
secretKey : 'IVONA_SECRET_KEY'
} ) ;
// ivona.putLexicon(name, content)
// [string] name - the name of this lexicon
// [string] content - PLS xml
// [object] config (optional) - override Ivona request via 'body' value
ivona . putLexicon ( 'newLexicon' , '<?xml ... ?><lexicon>...</lexicon>' )
. on ( 'complete' , function ( lexicons ) {
console . log ( lexicons ) ;
} ) ;
// ivona.getLexicon(name)
// [string] name - the name of this lexicon
// [object] config (optional) - override Ivona request via 'body' value
ivona . getLexicon ( 'newLexicon' )
. on ( 'complete' , function ( pls ) {
console . log ( pls ) ;
} ) ;
// ivona.deleteLexicon(name)
// [string] name - the name of this lexicon
// [object] config (optional) - override Ivona request via 'body' value
ivona . deleteLexicon ( 'newLexicon' )
. on ( 'complete' , function ( ) {
console . log ( 'Done' ) ;
} ) ;
// ivona.listLexicons()
// [object] config (optional) - override Ivona request via 'body' value
ivona . listLexicons ( )
. on ( 'complete' , function ( lexicons ) {
console . log ( lexicons ) ;
} ) ; var ivona = new Ivona ( {
accessKey : 'IVONA_ACCESS_KEY' ,
secretKey : 'IVONA_SECRET_KEY' ,
proxy : {
host : '0.0.0.0' ,
port : 12345
}
} ) ;