Skip to main content

Development with Generative AI

This page explains how to have generative AI and coding agents refer to the official AmiVoice API documentation to help with selecting an interface, investigating specifications, generating sample code, and more.

What is llms.txt

llms.txt is an index file for generative AI that gathers links to the main specifications and documentation of AmiVoice API into one place. It is published at the following URL.

It is not a list of every page on the site. It selects and organizes the pages you should read first when choosing a method, implementing, and operating. The linked pages are the Markdown versions of the documentation, which are easy for generative AI to retrieve.

What You Can Do

When you give llms.txt to a generative AI, you can use it for tasks such as the following.

  • Investigating the interface and parameters to use
  • Selecting a method that fits your requirements
  • Generating sample code
  • Support for development that uses new features

In every case, the goal is to have the official documentation referenced as the basis for the answer.

How to Use

Add the URL of llms.txt to your instructions to the generative AI. When you tell it "Use this URL as the starting point and refer to the official documentation it links to," the generative AI opens the necessary pages and answers.

To get accurate answers, also add the following two points to your instructions.

  • Do not guess parameter names or specifications
  • Include the URLs of the official documentation you referred to in the answer

Prompt Examples

These are prompt examples you can copy and use as is. Rewrite the audio conditions or what you want to implement according to your purpose.

Selecting an Interface

This is an example for handling a pre-recorded file.

Using https://docs.amivoice.com/llms.txt as the starting point,
please refer to the linked official AmiVoice API documentation.

When transcribing a pre-recorded audio file of about 30 minutes,
organize which interface, connection engine, and required request parameters to use.

Do not guess parameter names or specifications,
and include the URLs of the official documentation you referred to in your answer.

This is an example for sending audio in real time.

Using https://docs.amivoice.com/llms.txt as the starting point,
please refer to the linked official AmiVoice API documentation.

I want to send microphone audio from a browser in real time
and display interim recognition results on the screen.

Organize which to use among Synchronous HTTP, Asynchronous HTTP, and WebSocket,
along with the reasons, implementation steps, and documentation to refer to.

Generating Sample Code

Using https://docs.amivoice.com/llms.txt as the starting point,
please refer to the linked official AmiVoice API documentation.

Write Python code that transcribes a 16 kHz, monaural, WAV-format audio file
using the Synchronous HTTP interface.

Get the API key from an environment variable,
and handle HTTP errors and the result code in the response body.
Do not guess endpoints or parameters that do not exist.

Also include the URLs of the official documentation you referred to in your answer.

Improving Recognition Accuracy

Using https://docs.amivoice.com/llms.txt as the starting point,
please refer to the linked official AmiVoice API documentation.

I want to improve the recognition accuracy of audio that contains many technical terms.
Organize the available methods, such as the user dictionary and the choice of connection engine,
and show the setup steps for each and the documentation to refer to.

Do not guess specifications, and include the URLs of the official documentation you referred to in your answer.

Investigating Errors

Using https://docs.amivoice.com/llms.txt as the starting point,
please refer to the linked official AmiVoice API documentation.

Organize the meaning of the result codes returned in the response of the Synchronous HTTP interface,
along with the likely causes and how to deal with them.

On the premise of checking not only the HTTP status but also the result code in the response body,
do not guess specifications, and show the URLs of the official documentation you referred to.

How to Use It with AI That Cannot Refer to Web Pages

To refer to llms.txt by URL, the generative AI needs the ability to read web pages. If it does not have that ability, paste the content directly into the prompt and use it that way.

However, llms.txt is a list of links. Just pasting it does not convey the detailed specifications of the linked pages. Use the following steps.

  1. Paste the content of llms.txt and have it identify the pages you need for your purpose.
  2. Then paste the Markdown version of the documentation for the identified pages as well.

You can retrieve the Markdown version by adding .md to the end of the page URL. For example, the Getting Started page is https://docs.amivoice.com/en/amivoice-api/manual/getting-started.md.

What You Cannot Do with llms.txt

llms.txt is meant to make the official documentation easier to find and refer to. It cannot do the following.

  • Have the generative AI automatically connect to AmiVoice API
  • Have the generative AI run AmiVoice API directly as a tool
  • Guarantee the correctness of the generated code

Always check the generated code against the official reference before using it.

Notes on Usage

Because this deals with a speech recognition API, pay particular attention to the following points.

Handling of API Keys and Voice Data
  • Before entering API keys, voice data, personal information, and the like into a generative AI, check the terms of service and the security rules of your organization. When entering code or error logs, always check that this information is not unintentionally included.
  • If you do not need to present the API key itself, replace it with a dummy value or an environment variable name.
  • Check the generated code against the official reference before using it.
  • Always check the pricing, limitations, terms of service, and SLA on the current official pages.