Closed mehadi92 closed 1 year ago
Can you check this with latest code? I see confidence scores shown.
Closing. Please re-open the issue if you would like to follow up with this issue.
Hi @virajkarandikar, Thanks for your reply. Which version do you use? I use Riva 2.7.0, and Riva-python-client 0.0.5 and got this result. Could you please share code snippets and it's the output that you tested
@virajkarandikar Here is the code that I use. Please let me know if anything that I missing
Riva speech docker image nvcr.io/nvidia/riva/riva-speech 2.7.0
import wave
import riva.client
import riva.client.proto.riva_asr_pb2 as rasr
import riva.client.proto.riva_asr_pb2_grpc as rasr_srv
import riva.client.proto.riva_audio_pb2 as ra
# init riva recognition stub
riva_server = "0.0.0.0:50051"
auth = riva.client.Auth(uri=riva_server)
stub = rasr_srv.RivaSpeechRecognitionStub(auth.channel)
# init riva recognition configuration
config = rasr.RecognitionConfig(
encoding=ra.AudioEncoding.LINEAR_PCM,
sample_rate_hertz=16000,
language_code="en-US",
max_alternatives=1,
enable_automatic_punctuation=False,
audio_channel_count=1,
enable_word_time_offsets=True,
)
with wave.open(audio_file, "rb") as fp:
wav_data = fp.readframes(-1)
request = rasr.RecognizeRequest(config=config, audio=wav_data)
response = stub.Recognize(request)
if len(response.results) > 0 and len(response.results[0].alternatives) > 0:
outputs = response.results[0].alternatives[0]
print(outputs)
Hi, When I'm using the Riva command line tool
it's giving me a world level of confidence score
But when I'm using python API it don't give a confidence score
Is there anything that I'm missing? Or word-level confidence score feature is not available in python API
Thanks