Wav files generated are 0kb in size with no error
Zack T
0
Reputation points
I have been using this small script for weeks to generate wav audio files. However, yesterday, all the wav files that are generated have a 0kb file size. I have access to the directory that the file is written in and also it doesn't matter if it is an .mp3 or .wav file the created file always has 0kb size. I am using the free tier in azure. Could I have hit a limit? I am not sure why all of a sudden it will no longer generate the file.
using Microsoft.CognitiveServices.Speech.Audio;
using Microsoft.CognitiveServices.Speech;
namespace TextToSpeech
{
class Program
{
static async Task Main()
{
await SynthsizeAudioAsync();
}
static async Task SynthsizeAudioAsync()
{
var config = SpeechConfig.FromSubscription("***", "***");
config.SpeechSynthesisVoiceName = "en-US-ChristopherNeural";
AudioConfig audioConfig = AudioConfig.FromWavFileOutput("***");
using var synthesizer = new SpeechSynthesizer(config, audioConfig);
await synthesizer.SpeakTextAsync("Hello world!");
}
}
}
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,069 questions
Sign in to answer