The existing code works perfectly if we do not use the main function, but when i call this using main function i do not get the desired output. Printing all results from speech to text: Print("Printing all results from speech to text:")Įrror while calling from main function, test.wavĮxpected Output (Output without using main function) test.wav Speech_recognizer.start_continuous_recognition() #Appends the recognized text to the all_results variable. Speech_recognizer.stop_continuous_recognition() #result = speech_recognizer.recognize_once() Print("speech_recognizer:-",speech_recognizer) Speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_input) Speech_config.output_format = speechsdk.OutputFormat(1) Speech_config.request_word_level_timestamps() Speech_config.speech_recognition_language="en-US" Speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region)Īudio_input = (filename=filename) Import as speechsdkīlob_service_client = om_connection_string("DefaultEndpoint")Ĭontainer_client=blob_service_client.get_container_client(container_name)īlob_client = container_client.get_blob_client(filename) From import BlobServiceClient, BlobClient, ContainerClient
0 Comments
Leave a Reply. |