Comparing version 1.0.43 to 1.0.44
@@ -220,2 +220,9 @@ export = Client; | ||
}>; | ||
speechSynthesis(text: string, voice?: string): Promise<{ | ||
status: number; | ||
statusText: string; | ||
data: { | ||
url: string; | ||
}; | ||
}>; | ||
summarization(text: string, size?: string): Promise<{ | ||
@@ -222,0 +229,0 @@ status: number; |
@@ -243,2 +243,11 @@ const axios = require('axios') | ||
speechSynthesis(text, voice = null) { | ||
const payload = { | ||
'text': text, | ||
'voice': voice | ||
}; | ||
return axios.post(this.rootURL + '/' + 'speech-synthesis', payload, { headers: this.headers }) | ||
} | ||
summarization(text, size = null) { | ||
@@ -245,0 +254,0 @@ const payload = { |
{ | ||
"name": "nlpcloud", | ||
"version": "1.0.43", | ||
"description": "NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, text generation, image generation, blog post generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, embeddings, and dependency parsing. It is ready for production, served through a REST API.\n\nThis is the Node.js client for the NLP Cloud API.\n\nMore details here: https://nlpcloud.io\n\nDocumentation: https://docs.nlpcloud.io", | ||
"version": "1.0.44", | ||
"description": "NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, text generation, image generation, blog post generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, speech synthesis, embeddings, and dependency parsing. It is ready for production, served through a REST API.\n\nThis is the Node.js client for the NLP Cloud API.\n\nMore details here: https://nlpcloud.io\n\nDocumentation: https://docs.nlpcloud.io", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -374,2 +374,12 @@ # Node.js Client For NLP Cloud | ||
### Speech Synthesis Endpoint | ||
Call the `speechSynthesis()` method and pass the text you want to convert to audio: | ||
```js | ||
client.speechSynthesis("<Your block of text>") | ||
``` | ||
The above command returns a JSON object. | ||
### Summarization Endpoint | ||
@@ -376,0 +386,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35469
512
415