Speech To Text Microservice
Synced from home2
Generated from home2/hri/microservices/stt/README.md @ 7288a44 by scripts/sync_home2_readmes.py. Edit the README in home2 instead of this page.
Running on L4T
Contains two gRPC servers, one uses whisper and the other faster-whisper for improved speed and precision. To run with cuda on l4t a docker image was generated with CTranslate2. You can pull it by running:
Next, build a container by running:
# pwd -> /hri/microservices/stt
docker run -it -p 8888:8888 --name fast-whisper -v .:/workspace tacolon27/faster-whisper-l4t-cuda
Finally, to start a server just run the perferred script.
Running on CPU
If testing or running on a PC/laptop, use docker compose to run the scripts.
gRPC implementation
The scripts in this implementation import speech_pb2_grpc.py and speech_pb2.py which contain classes and gRPC boilerplate generated by speech.proto file where the service and message types are defined. In case of a modification, generate the scripts by running: run.sh hri --build-proto.