Search code examples
grpc-python

Received message larger than max error on GRPC , calling audio2face API


I am facing this issue. The message size I am pushing to NVIDIA audiotoface is bigger (13417774 vs. 4194304).

`Message=<_InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = “Received message larger than max (13417774 vs. 4194304)”
debug_error_string = "UNKNOWN:Error


push_audio_track

response = stub.PushAudio(request)

push_audio_track(a2f_url, wavarr, sample_rate, a2f_avatar_instance)`

Tried using push_audio_track and push_audio_track_stream as well. Error remains the same.

Any help on this would be much appreciated

  1. I tried fixing it by creating a grpc channel with max send/recieve message length of unlimited (-1)

    `('grpc.max_message_length', -1),

    ('grpc.max_send_message_length', -1),

    ('grpc.max_receive_message_length', -1)`

But it doesnt work. The max in error is still displaying as 4194304. I guess its not related to the channel I am creating at all. I need to set these values at the grpc server side as well ? I think the player streaming instance ? cant find where to set this inside audio2face.

  1. Reducing the audio size seems unrelated. The request message size is till higher

Solution

  • I have fixed the issue by setting the grpc.max_message_length = -1 in stearming audioplayer server instance here

    audio2face-2023.1.1\exts\omni.audio2face.player\omni\audio2face\player\scripts\streaming_server\server.py.

    not sure why the grpc.sever as was intialized at 4 mb default grpc.mesage lenght. It would make it unsuitable for sending the audio data. Is there any way we can push the audio in compressed format mp3 ?