Unable to delete audio file

Pooja Kamra 11 Reputation points
2022-04-08T09:18:19.767+00:00

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

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,391 questions
{count} vote

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,151 Reputation points
    2022-04-14T17:37:47.33+00:00

    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.

    0 comments No comments