Open aldiazhar opened 1 year ago
I've identified the issue related to the proto and server.py files, so I made changes to both. However, after the modifications, there is no response from:
response = asr_service.offline_recognize(data, offline_config)
and there's no error message either.
server.py
import grpc
from concurrent import futures
import asyncio
import riva.proto.riva_asr_pb2 as riva_asr_pb2
import riva.proto.riva_asr_pb2_grpc as riva_asr_pb2_grpc
class RivaSpeechRecognitionServicer(riva_asr_pb2_grpc.RivaSpeechRecognitionServicer):
async def Recognize(self, request, context):
# Implement your logic for batch processing here
response = riva_asr_pb2.RecognizeResponse()
# Populate response with recognition results
return response
async def StreamingRecognize(self, request_iterator, context):
# Implement your logic for streaming recognition here
async for streaming_request in request_iterator:
# Process streaming request and update recognition results
response = riva_asr_pb2.StreamingRecognizeResponse()
# Populate response with streaming recognition results
yield response
async def GetRivaSpeechRecognitionConfig(self, request, context):
# Implement logic to provide ASR configuration
response = riva_asr_pb2.RivaSpeechRecognitionConfigResponse()
# Populate response with ASR configuration
return response
async def serve():
server = grpc.aio.server()
riva_asr_pb2_grpc.add_RivaSpeechRecognitionServicer_to_server(RivaSpeechRecognitionServicer(), server)
server.add_insecure_port("[::]:50051")
print("Server started on port 50051")
await server.start()
await server.wait_for_termination()
if __name__ == "__main__":
asyncio.run(serve())
Hello, I am following the ASR tutorial using Python and Riva from NVIDIA tutorial asr on a Mac OS system and using Jupyter Notebook.
However, I am encountering an issue with the offline_recognize function:
response = asr_service.offline_recognize(data, offline_config)
I am getting the following error:
server.py
Are there any suggestions or specific solutions to address this issue, especially considering the use of Mac OS and Jupyter Notebook?"