Tech blog
  • HOME
  • Blog
  • You can try AmiVoice on Insomnia. It transcribes audio files.

You can try AmiVoice on Insomnia. It transcribes audio files.

Published: 2021.12.20 Last updated: 2025.03.04


yearThat minion

Nice to meet you, I'm "That Minion."
When you hover your mouse over a hyperlink, it will appearThat minion.
*By the way, you can customize the mouse pointer to your liking!

table of contents

 Introduction
 1. Prepare to try out AmiVoice with Insomnia
 2. Check the APPKEY required to log in and connect to ACP
 3. Try AmiVoice Synchronous HTTP Speech Recognition API
 4. Try AmiVoice Asynchronous HTTP Speech Recognition API
 Final thoughts

Introduction

About Insomnia

Insomnia is an app for testing REST APIs.
You can easily create HTTP requests and
You can check the response content, speed, etc. in detail.

This time, we will use this API client app, Insomnia,
AmiVoice Cloud Platform (ACP) cloud services,
AmiVoice HTTP speech recognition APILet's try it out!

What you will learn from this article (if you put it into practice)

・'Insomnia" is an incredibly easy tool to use.

・'AmiVoice (general-purpose engine for conversation)The perceived accuracy of

・'Synchronous/asynchronous HTTP speech recognition APIResponse content/speed of

・'Synchronous/Asynchronous''Log saving/No log savingDifferences and points to note

List of things you need to put into practice

・Environment where Insomnia can be installed

・YAML file to import into Insomnia (*We will explain this later)

・ACP APPKEY (※ACP user registration required)
 Application for Use – AmiVoice Cloud Platform

- The audio file you want to recognize (please be careful with the audio format)
 About Audio Formats – AmiVoice Cloud Platform

1. Prepare to try out AmiVoice with Insomnia

About the YAML file to import into Insomnia

This time, we have made it super easy to try out AmiVoice Cloud Platform (ACP) from Insomnia.
We have prepared templates that you can use immediately by simply importing them.

Step 1: Download the YAML file from this link.
https://go.amivoice.com/Insomnia_ACP


Insomnia top page and download page

The Insomnia homepage and download page are here.
Insomnia is said to be compatible with Windows, MacOS, and Ubuntu.
*The version used at the time of writing was Windows version 2021.6.0.

insomnia.rest

insomnia.rest


Download and install Insomnia

Step 2: Click on the blue frame on the download page to download.
*If you are not using WindowsThis →  Download for MacOS / Ubuntu or See all downloads.
Step 3: After downloading, install it.

Click the blue frame to start downloading (for Windows)

Click the blue frame to start downloading (for Windows)

Importing a YAML file into Insomnia

Step 4: After installation, follow the instructions and images below.
Import the YAML file downloaded in step 1.

After installation, click From File

After installation, click From File

*You can also do this from [Create ▼] and then [+ File].

*You can also click [Create ▼] and then [+ File].

Extract the downloaded ZIP file and import the YAML file.

Unzip the downloaded ZIP file,
Import the YAML file

After importing, the Collection will be added to the Dashboard screen.

After importing, the Collection will be added to the Dashboard screen.

When you click on Collection, you will see this screen:

When you click on Collection, you will see this screen:

The rest is the part framed in yellow, which is currently empty.
u=(APPKEY) and a=(Audio file) is all you need to prepare.
*The ZIP file in step 2 includes two sample audio files.
 You can try using this audio file.

2. Check the APPKEY required to log in and connect to ACP

Log in to your ACP page and check your APPKEY.

The official ACP website can be found at this link
Speech Recognition API – AmiVoice Cloud Platform
*After November 1, 2021,All engines (13 types)Free for up to 60 minutes per monthYou can try it out!

Click My Page on the top right of the ACP official website and log in to My Page.

At the top right of the ACP official website,
Click on My Page to log in to My Page

After logging in, click on Connection Information and find your APPKEY there.

After logging in, click on Connection Information
Check your APPKEY from there

 

Your APPKEY, service ID, and service password are confidential information.

If your information is leaked, your voice recognition service may be used without your permission.
This confidential information isStrictly managedplease.

 

3. Try AmiVoice Synchronous HTTP Speech Recognition API

Data size limit for synchronous HTTP speech recognition API

The synchronous HTTP speech recognition API includes:
There is a limit to the size of audio data that can be uploaded at one time.
The maximum volume of audio data that can be received is16MB.
Restrictions – AmiVoice Cloud Platform

If you need to upload more audio data than this limit,
As explained in the next chapter,Asynchronous HTTPis available for you to purchase online.

Difference between logging and non-logging for synchronous HTTP speech recognition API

The difference between "log saving" and "no log saving" for the synchronous HTTP speech recognition API is
Destination URL(The yellow-green underlined part) and the unit price of the usage fee are different.

The audio sent to the URL of the synchronous HTTP speech recognition API with logging is
You will be able to listen to it from the audio playback screen on your My Page.
You can also check the recognition results from this screen.2 days.

In addition, the voice and recognition results sent to the URL with "log saved" are
We may use it to improve the performance of our products.
About log storage – AmiVoice Cloud Platform

Synchronous HTTP speech recognition API with log saving

Synchronous HTTP speech recognition API with log saving

Synchronous HTTP speech recognition API - no logging

Synchronous HTTP speech recognition API - no logging


Enter the APPKEY in the POST request and select the audio file

Step 1: Select either "Synchronous HTTP Speech Recognition API" (Yes/No).
Step 2: In the u parameter field, enter theAPPKEYPlease enter
Step 3: Select the parameter you want to recognize from the a parameter column.Audio fileplease choose.

Enter the APPKEY and select the audio file

Enter the APPKEY and select the audio file

Click Send to receive the voice recognition results.

Step 4: Click Send to send the audio file to the speech recognition server.
Once the recognition process is complete on the server side, the recognition results areJSON formatIt will be returned in.
*If voice recognition is successful, you can see the recognition results.

Click Send and you'll get a response like this:

Click Send,
When the response comes back it looks like this

4. Try AmiVoice Asynchronous HTTP Speech Recognition API

Data size limit for asynchronous HTTP speech recognition API

Asynchronous HTTP speech recognition API also
There is a limit to the size of audio data that can be uploaded at one time.
The maximum volume of audio data that can be received is2.14GB.
Restrictions – AmiVoice Cloud Platform

Rather than a synchronous HTTP speech recognition API,Large amounts of audio data can be transmittedNoto,
With the voice recognition serverCommunication time can be reducedSo,
通常は、Asynchronous use is recommended international success.

Difference between logging and non-logging for asynchronous HTTP speech recognition API

The asynchronous HTTP speech recognition API has two settings: "with logging" and "without logging."
The destination URL is the sameHowever,
d parameter contents(The yellow-green underlined part) and the unit price of the usage fee are different.

To "No logs" (i.e. opt out of data logging),
dIn the parameter field, enter loggingOptOut=Truemust be specified.
*Please note that if not specified, "Logs will be saved" will be assumed.

In addition, the voice and recognition results sent with the "Log Saved" setting will be
We may use it to improve the performance of our products.
About log storage – AmiVoice Cloud Platform

Asynchronous HTTP speech recognition API with log saving

Asynchronous HTTP speech recognition API with log saving

Asynchronous HTTP speech recognition API - no logging

Asynchronous HTTP speech recognition API - no logging

Enter the APPKEY in the POST request and select the audio file

Step 1: Select either "Asynchronous HTTP Speech Recognition API" (Yes/No).
Step 2: In the u parameter field, enter theAPPKEYPlease enter
Step 3: Select the parameter you want to recognize from the a parameter column.Audio fileplease choose.

Enter the APPKEY and select the audio file

Enter the APPKEY and select the audio file

 

Click Send and receive a session ID.

Step 4: Click Send to send the audio file to the speech recognition server.
Once the audio file has been sent,sessionid JSON formatIt will be returned in.

To get the speech recognition results for the audio file you sent,
このsessionidYou need to make a GET request using the (yellow part).
*The behavior of this part is slightly different from the asynchronous HTTP speech recognition API.

Click Send and you'll get a response like this:

Click Send,
When the response comes back it looks like this

Enter the APPKEY and session ID in the GET request

Step 5: Select "Asynchronous HTTP Speech Recognition API_Status Check/Result Acquisition".
Step 6: In the Bearer TOKEN section (blue area),APPKEYPlease enter
Step 7: AcquiredsessionidPlease enter the above in the ● section (yellow section).
*//acp-api-async.amivoice.com/v1/recognitions/●←Here

Asynchronous HTTP speech recognition API_Status check/result acquisition Enter APPKEY and session ID

Asynchronous HTTP speech recognition API - Status check/result acquisition
Enter your APPKEY and session ID

Click Send to receive the voice recognition results.

Step 8: Click Send and if the GET request is successful,
Returns the status of the speech recognition request and information about that status.

If the request is successful, the status will be as follows:Five valuesTake.

queued: The job is registered in the queue.

started: The job has been removed from the queue and the execution environment is being prepared.

processing: The job is being executed.

completed: The state where the results have been obtained from the speech recognition process.

error: A state in which some error has occurred.

The status of the speech recognition request iscompletedIf it is,
You can see the recognition results.
* In the case of asynchronous voice recognition, the storage period for voice recognition results is7 days.
 Also, on My PageAudio playback is not availableSo be careful.

If the request failed, the HTTP response codeOther than 200Returns
For details on the error response, please see this link.
I/F Specifications Asynchronous HTTP Speech Recognition API Details – AmiVoice Cloud Platform

Click Send and if the request status is completed, it will look like this

Click Send,
If the request status is completed, it will look like this:

Final thoughts

What do you think? Were you able to recognize the voice?
With Insomnia, all you need to do is copy and paste and click.
I hope you were able to try out AmiVoice's HTTP speech recognition API.

In addition, the voice recognition engine that was tested this time was
It is a general-purpose conversation engine (-a-general),
d In the parameter field, enter "grammarFileNames=-a-general"
Just change the "-a-general" part to the name of another connection engine,
You will be able to try out different types of speech recognition engines.

*After November 1, 2021,All engines (13 types)Free for up to 60 minutes per monthYou can try it out!
*For other connection engine names, please see the ACP My Page.
 Please see the connection information (connection information by engine).
 Login – AmiVoice Cloud Platform

We have also briefly summarized the characteristics, differences, and points to note between synchronous and asynchronous communication.
I hope this was helpful. Thank you for reading to the end.

A brief summary of the characteristics and differences between synchronous and asynchronous

Synchronous HTTP

・The maximum volume of audio data that can be received is16MB.

・To get the recognition results,Just POSTThat's fine.

・The longer the audio file, the slower the response during POST.

・"Log save" and "No log save"The destination URL is different.

Only audio sent with "log saved",
 My PageCan be played using the audio playback function. ※Audio dataThe retention period for2 days.

Asynchronous HTTP

・The maximum volume of audio data that can be received is2.14GB.

・To get the recognition results,After POSTTo
 Using session IDNeed to GETThere is.

・The larger the audio file size, the slower the response time during POST.
 Faster than synchronous HTTP*The response time when GET is much faster.

・"Log save" and "No log save"The destination URL is the sameBut,
 The contents of the d parameter (the value specified for loggingOptOut) are different.

・My PageAudio playback is not available.

Recognition resultThe retention period is7 days*The recognition results must be obtained by then.

Person who wrote this article

  • That minion

    That minion

    So that most of the work can be done just by clicking.
    We are constantly experimenting in the areas of business automation, RPA, and MA.
    We will promote "better ways of working" by being robot-compatible!

Use API for Free