API: Azure Vietnamese


📖 To learn more, take a look at our complete API

📤 Example Request

  1. Generate an api key below👇

  2. Install node-fetch & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code and don't use direcly in the browser.

$ npm install node-fetch
$ export GOOEY_API_KEY=sk-xxxx
  1. Use this sample code to call the API.
    If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
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();
  1. Generate an api key below👇

  2. Install requests & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code.

$ python3 -m pip install requests
$ export GOOEY_API_KEY=sk-xxxx
  1. Use this sample code to call the API.
    If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
import os
import requests

payload = {
    "text_prompt": "Ruồi trắng có thể là vấn đề đối với cây ớt. Để kiểm soát ruồi trắng và ngăn chặn sự lây lan của virus xoăn lá ớt, bạn có thể sử dụng thuốc trừ sâu như cypermethrin, deltamethrin, bifenthrin, diafenthiuron, thiamethoxam, imidacloprid, acetamiprid, spiromesifen, buprofezin, cyantraniliprole, spirotetramat và chiết xuất terpenes tổng hợp của chenopodium [1]. Ngoài ra, bạn có thể thực hiện theo các biện pháp sau để quản lý bọ phấn và các loài gây hại khác trên cây ớt:\n•\u2060  \u2060Duy trì khoảng cách khuyến nghị giữa các cây để tránh trồng mật độ cao, tạo điều kiện cho sâu bệnh phát triển [2].\n•\u2060  \u2060Bón phân cân đối với lượng kali tăng cường để tạo ra sức đề kháng cho cây trồng chống lại sâu bệnh [2].\n•\u2060  \u2060Dùng tấm polythene màu bạc để che phủ nhằm hạn chế sự phát triển của sâu bệnh trong đất [2].\n•\u2060  \u2060Trồng các loại cây trồng biên giới như lúa miến hoặc ngô để làm rào cản cho sự di chuyển của sâu bệnh [2].\n•\u2060  \u2060Trồng xen ớt với ngô, lúa miến, đậu đũa để tạo ổ chứa thiên địch có khả năng phòng trừ sâu bệnh [2].\n•\u2060  \u2060Thực hành xen canh thường xuyên để tiêu diệt nhộng sâu hại sống trong đất [2].\n•\u2060  \u2060Giữ ruộng sạch sẽ và giữ các luống không có cỏ dại vì cỏ dại có thể đóng vai trò là vật chủ thay thế cho sâu bệnh [2].\n•\u2060  \u2060Xem xét luân canh cây trồng với các loại ngũ cốc như lúa gạo hoặc lúa mì [2].\n•\u2060  \u2060Sử dụng các biện pháp cơ học như kẹp chặt, tiêu hủy nặng nề.",
    "tts_provider": "AZURE_TTS",
    "elevenlabs_voice_name": None,
    "elevenlabs_voice_id": "21m00Tcm4TlvDq8ikWAM",
    "elevenlabs_style": 0,
    "elevenlabs_api_key": None,
}

response = requests.post(
    "https://api.gooey.ai/v2/TextToSpeech?example_id=64e59abnm4tm",
    headers={
        "Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
    },
    json=payload,
)
assert response.ok, response.content

result = response.json()
print(response.status_code, result)
  1. Generate an api key below👇

  2. Install curl & add the GOOEY_API_KEY to your environment variables.
    Never store the api key in your code.

export GOOEY_API_KEY=sk-xxxx
  1. Run the following curl command in your terminal.
    If you encounter any issues, write to us at [email protected] and make sure to include the full curl command and the error message.
curl 'https://api.gooey.ai/v2/TextToSpeech?example_id=64e59abnm4tm' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "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
}'

🎁 Example Response

{4 Items
"id"
:
string
"t8d5dwboyfjr"
"url"
:
string
"https://gooey.ai/compare-text-to-speech-engines/"
"created_at"
:
string
"2024-05-03T15:48:08.897166+00:00"
"output"
:
{1 Items
"audio_url"
:
string
"https://storage.googleapis.com/dara-c1b52.appspot."
}
}

Please Login to generate the $GOOEY_API_KEY