import fetch from 'node-fetch';
const payload = {
"text_prompt": "Ru\u1ed3i tr\u1eafng c\u00f3 th\u1ec3 l\u00e0 v\u1ea5n \u0111\u1ec1 \u0111\u1ed1i v\u1edbi c\u00e2y \u1edbt. \u0110\u1ec3 ki\u1ec3m so\u00e1t ru\u1ed3i tr\u1eafng v\u00e0 ng\u0103n ch\u1eb7n s\u1ef1 l\u00e2y lan c\u1ee7a virus xo\u0103n l\u00e1 \u1edbt, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng thu\u1ed1c tr\u1eeb s\u00e2u nh\u01b0 cypermethrin, deltamethrin, bifenthrin, diafenthiuron, thiamethoxam, imidacloprid, acetamiprid, spiromesifen, buprofezin, cyantraniliprole, spirotetramat v\u00e0 chi\u1ebft xu\u1ea5t terpenes t\u1ed5ng h\u1ee3p c\u1ee7a chenopodium [1]. Ngo\u00e0i ra, b\u1ea1n c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n theo c\u00e1c bi\u1ec7n ph\u00e1p sau \u0111\u1ec3 qu\u1ea3n l\u00fd b\u1ecd ph\u1ea5n v\u00e0 c\u00e1c lo\u00e0i g\u00e2y h\u1ea1i kh\u00e1c tr\u00ean c\u00e2y \u1edbt:\n\u2022\u2060 \u2060Duy tr\u00ec kho\u1ea3ng c\u00e1ch khuy\u1ebfn ngh\u1ecb gi\u1eefa c\u00e1c c\u00e2y \u0111\u1ec3 tr\u00e1nh tr\u1ed3ng m\u1eadt \u0111\u1ed9 cao, t\u1ea1o \u0111i\u1ec1u ki\u1ec7n cho s\u00e2u b\u1ec7nh ph\u00e1t tri\u1ec3n [2].\n\u2022\u2060 \u2060B\u00f3n ph\u00e2n c\u00e2n \u0111\u1ed1i v\u1edbi l\u01b0\u1ee3ng kali t\u0103ng c\u01b0\u1eddng \u0111\u1ec3 t\u1ea1o ra s\u1ee9c \u0111\u1ec1 kh\u00e1ng cho c\u00e2y tr\u1ed3ng ch\u1ed1ng l\u1ea1i s\u00e2u b\u1ec7nh [2].\n\u2022\u2060 \u2060D\u00f9ng t\u1ea5m polythene m\u00e0u b\u1ea1c \u0111\u1ec3 che ph\u1ee7 nh\u1eb1m h\u1ea1n ch\u1ebf s\u1ef1 ph\u00e1t tri\u1ec3n c\u1ee7a s\u00e2u b\u1ec7nh trong \u0111\u1ea5t [2].\n\u2022\u2060 \u2060Tr\u1ed3ng c\u00e1c lo\u1ea1i c\u00e2y tr\u1ed3ng bi\u00ean gi\u1edbi nh\u01b0 l\u00faa mi\u1ebfn ho\u1eb7c ng\u00f4 \u0111\u1ec3 l\u00e0m r\u00e0o c\u1ea3n cho s\u1ef1 di chuy\u1ec3n c\u1ee7a s\u00e2u b\u1ec7nh [2].\n\u2022\u2060 \u2060Tr\u1ed3ng xen \u1edbt v\u1edbi ng\u00f4, l\u00faa mi\u1ebfn, \u0111\u1eadu \u0111\u0169a \u0111\u1ec3 t\u1ea1o \u1ed5 ch\u1ee9a thi\u00ean \u0111\u1ecbch c\u00f3 kh\u1ea3 n\u0103ng ph\u00f2ng tr\u1eeb s\u00e2u b\u1ec7nh [2].\n\u2022\u2060 \u2060Th\u1ef1c h\u00e0nh xen canh th\u01b0\u1eddng xuy\u00ean \u0111\u1ec3 ti\u00eau di\u1ec7t nh\u1ed9ng s\u00e2u h\u1ea1i s\u1ed1ng trong \u0111\u1ea5t [2].\n\u2022\u2060 \u2060Gi\u1eef ru\u1ed9ng s\u1ea1ch s\u1ebd v\u00e0 gi\u1eef c\u00e1c lu\u1ed1ng kh\u00f4ng c\u00f3 c\u1ecf d\u1ea1i v\u00ec c\u1ecf d\u1ea1i c\u00f3 th\u1ec3 \u0111\u00f3ng vai tr\u00f2 l\u00e0 v\u1eadt ch\u1ee7 thay th\u1ebf cho s\u00e2u b\u1ec7nh [2].\n\u2022\u2060 \u2060Xem x\u00e9t lu\u00e2n canh c\u00e2y tr\u1ed3ng v\u1edbi c\u00e1c lo\u1ea1i ng\u0169 c\u1ed1c nh\u01b0 l\u00faa g\u1ea1o ho\u1eb7c l\u00faa m\u00ec [2].\n\u2022\u2060 \u2060S\u1eed d\u1ee5ng c\u00e1c bi\u1ec7n ph\u00e1p c\u01a1 h\u1ecdc nh\u01b0 k\u1eb9p ch\u1eb7t, ti\u00eau h\u1ee7y n\u1eb7ng n\u1ec1.",
"tts_provider": "AZURE_TTS",
"elevenlabs_voice_name": null,
"elevenlabs_voice_id": "21m00Tcm4TlvDq8ikWAM",
"elevenlabs_style": 0,
"elevenlabs_api_key": null
};
async function gooeyAPI() {
const response = await fetch("https://api.gooey.ai/v2/TextToSpeech?example_id=64e59abnm4tm", {
method: "POST",
headers: {
"Authorization": "bearer " + process.env["GOOEY_API_KEY"],
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (!response.ok) {
throw new Error(response.status);
}
const result = await response.json();
console.log(response.status, result);
}
gooeyAPI();