Audio2Face streaming Player Max Send / receive message length

I am facing this issue. The message size I am pushing to 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

response = stub.PushAudio(request)
push_audio_track(a2f_url, wavarr, sample_rate, a2f_avatar_instance)

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. I guess 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.

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

l is my audio file size is normal ?

Any help on this would be much appreciated

I am using audio2face headless server and RestAPI for pushing the audio. The sample code used in provided in a2f installation. Tried reducing the audio size, but it seems unrelated. The audio_data size is much smaller than 13417774 .

Hi @shekhar2 Is it possible you don’t have enough memory? Could you please send your machine specs?

It doesn’t seem so. I have got 32 gig installed ram and 1 GPU , with CUDA installed. Received message is certainly larger than 4mb and grpc is pointing out the max is 4194304. Although I am setting -1 when creating the channel.

Ideally, I want to be able to set the grpc server message length larger than 4 mb default. For audio data it seems too small. But where exactly I do this is the question for a streaming player ?

server = grpc.server(futures.ThreadPoolExecutor(max_workers=10),
                     options=[('grpc.max_message_length', maxMsgLength),
                              ('grpc.max_send_message_length', maxMsgLength),
                              ('grpc.max_receive_message_length', maxMsgLength)])

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


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 ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.