API Documentation (Streaming - gRPC)

<Under Development>

gRPC is a cross-platform open source high performance Remote Procedure Call framework. gRPC was initially created by Google. We can stream voice speech directly from any microphone to our ASR engine and our gRPC ASR service will response back the transcription automatically when the silence period (about 1.5 seconds) is detected.

This service is not yet openly available. If you are interested, please contact for endpoint information at ai@iapp.co.th

gRPC client example are available as follows: Python - https://github.com/kobkrit/iapp-asr-grpc-python Kotlin - {Coming soon}

Python Client gRPC example

Stream from file


from __future__ import print_function

import grpc
import ASR_pb2_grpc as ASR_pb2_grpc
import ASR_pb2 as pb2
import sys

def make_SpeechRecognitionRequest(voice):
    return pb2.SpeechRecognitionRequest(

def generate_voices():
    with open('kaitomm.mp3', 'rb') as fd:
        content = fd.read()

        requests = [
        for request in requests:
            print("Hello Server Sending voiceStreaming to you with size %d" % len(request.speechVoice))
            yield request

def test(stub, message):
    Client function to call the rpc for GetServerResponse
    message = pb2.SpeechRecognitionMessage(message=message)
    print(f'Sending Message: {message}', file=sys.stderr)
    return stub.test(message)
def asr_voice_streaming(stub):
    responses = stub.recognize(generate_voices())
    print(responses, file=sys.stderr)
    for response in responses:
        print("Hello from the server received your %s" % response, file=sys.stderr)

def run():
    # Please contact ai@iapp.co.th for gRPC HOST address.
    with grpc.insecure_channel('{gRPC HOST}') as channel:
        stub = ASR_pb2_grpc.ASRStub(channel)
        resp = test(stub, "Hello World!")

if __name__ == '__main__':

Stream directly from microphone

{Coming soon}

Last updated