Hi, based on the error message, you'd need to identify the running process and stop it in order to delete the file. Consider using Process Explorer to identify the running process.
Unable to delete audio file
Pooja Kamra
11
Reputation points
Hi,
I am using azure speech to text service. Originally i have video file and then getting audio file using ffmpeg.
import azure.cognitiveservices.speech as speechsdk
speech_config = speechsdk.SpeechConfig(subscription=key, endpoint=endpoint)
speech_config.request_word_level_timestamps()
speech_config.output_format = speechsdk.OutputFormat(1)
audio_config = speechsdk.audio.AudioConfig(filename=audio_file)
Here in AudioConfig, i am send path of audio file. Even after session is closed, i am not able to delete the audio file.
Please help for the same