C# audio directory issue












0















Alright, I'm developing a speech recognition system which is working completely fine, I've had no problems with it up until now. And yes i did google search it and look to see if the question had already been answered, but nothing turned up.



What I did was save some text-to-speech lines and put them into the program, it worked fine up until about the 5th audio file, I ran it to try and test if it worked and the program crashed with this error:



NotSupportedException: The given path's format is not supported


which is weird because for every other audio file it worked, the code looks like this :



System.Media.SoundPlayer player8 = new System.Media.SoundPlayer(@"‪C:UsersuserDesktopJMAS LINE15.wav");player8.Play();


It's strange because only specific ones work and don't work
Any help would be appreciated










share|improve this question













migrated from superuser.com Feb 11 at 13:40


This question came from our site for computer enthusiasts and power users.



















  • So did you verify with some other player (like VLC) that the file is indeed okay?

    – Daniel B
    Feb 10 at 18:46






  • 2





    (1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

    – Scott
    Feb 10 at 19:24











  • (Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

    – Scott
    Feb 10 at 19:24






  • 1





    (Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

    – Scott
    Feb 10 at 19:24











  • The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

    – elgonzo
    Feb 11 at 13:57


















0















Alright, I'm developing a speech recognition system which is working completely fine, I've had no problems with it up until now. And yes i did google search it and look to see if the question had already been answered, but nothing turned up.



What I did was save some text-to-speech lines and put them into the program, it worked fine up until about the 5th audio file, I ran it to try and test if it worked and the program crashed with this error:



NotSupportedException: The given path's format is not supported


which is weird because for every other audio file it worked, the code looks like this :



System.Media.SoundPlayer player8 = new System.Media.SoundPlayer(@"‪C:UsersuserDesktopJMAS LINE15.wav");player8.Play();


It's strange because only specific ones work and don't work
Any help would be appreciated










share|improve this question













migrated from superuser.com Feb 11 at 13:40


This question came from our site for computer enthusiasts and power users.



















  • So did you verify with some other player (like VLC) that the file is indeed okay?

    – Daniel B
    Feb 10 at 18:46






  • 2





    (1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

    – Scott
    Feb 10 at 19:24











  • (Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

    – Scott
    Feb 10 at 19:24






  • 1





    (Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

    – Scott
    Feb 10 at 19:24











  • The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

    – elgonzo
    Feb 11 at 13:57
















0












0








0








Alright, I'm developing a speech recognition system which is working completely fine, I've had no problems with it up until now. And yes i did google search it and look to see if the question had already been answered, but nothing turned up.



What I did was save some text-to-speech lines and put them into the program, it worked fine up until about the 5th audio file, I ran it to try and test if it worked and the program crashed with this error:



NotSupportedException: The given path's format is not supported


which is weird because for every other audio file it worked, the code looks like this :



System.Media.SoundPlayer player8 = new System.Media.SoundPlayer(@"‪C:UsersuserDesktopJMAS LINE15.wav");player8.Play();


It's strange because only specific ones work and don't work
Any help would be appreciated










share|improve this question














Alright, I'm developing a speech recognition system which is working completely fine, I've had no problems with it up until now. And yes i did google search it and look to see if the question had already been answered, but nothing turned up.



What I did was save some text-to-speech lines and put them into the program, it worked fine up until about the 5th audio file, I ran it to try and test if it worked and the program crashed with this error:



NotSupportedException: The given path's format is not supported


which is weird because for every other audio file it worked, the code looks like this :



System.Media.SoundPlayer player8 = new System.Media.SoundPlayer(@"‪C:UsersuserDesktopJMAS LINE15.wav");player8.Play();


It's strange because only specific ones work and don't work
Any help would be appreciated







audio c#






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 10 at 18:15







Robert Keenan











migrated from superuser.com Feb 11 at 13:40


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com Feb 11 at 13:40


This question came from our site for computer enthusiasts and power users.















  • So did you verify with some other player (like VLC) that the file is indeed okay?

    – Daniel B
    Feb 10 at 18:46






  • 2





    (1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

    – Scott
    Feb 10 at 19:24











  • (Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

    – Scott
    Feb 10 at 19:24






  • 1





    (Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

    – Scott
    Feb 10 at 19:24











  • The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

    – elgonzo
    Feb 11 at 13:57





















  • So did you verify with some other player (like VLC) that the file is indeed okay?

    – Daniel B
    Feb 10 at 18:46






  • 2





    (1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

    – Scott
    Feb 10 at 19:24











  • (Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

    – Scott
    Feb 10 at 19:24






  • 1





    (Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

    – Scott
    Feb 10 at 19:24











  • The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

    – elgonzo
    Feb 11 at 13:57



















So did you verify with some other player (like VLC) that the file is indeed okay?

– Daniel B
Feb 10 at 18:46





So did you verify with some other player (like VLC) that the file is indeed okay?

– Daniel B
Feb 10 at 18:46




2




2





(1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

– Scott
Feb 10 at 19:24





(1) You say, “it worked fine up until about the 5th audio file”, and I’m not sure what you mean.  Do you mean that some files consistently work and some files consistently don’t work (this is what you seem to be saying in the next paragraph), or are you saying that, after you have successfully processed four files, the next one fails, no matter which one it is?  (2) I’m intrigued by the message ‘‘The given path's format is not supported’’.  Is it possibly an issue with the files’ names?  Try taking one file that works and one that doesn’t, and renaming them to each other’s names.

– Scott
Feb 10 at 19:24













(Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

– Scott
Feb 10 at 19:24





(Cont’d) …  (3) It might help if you told us something about your environment — what operating system; what compiler and software development environment, etc. … … … … … … …  … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.  … (Cont’d)

– Scott
Feb 10 at 19:24




1




1





(Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

– Scott
Feb 10 at 19:24





(Cont’d) …  P.S. One can make the argument that this question is about getting system services to work, and about file formats, and therefore it is on-topic for Super User.  However, some people will make the argument that the question is about programming, and therefore it is off-topic for Super User and belongs on Stack Overflow. If you don’t get a satisfactory answer here after a couple of days, I suggest that you flag it for moderator attention and ask to have it migrated to Stack Overflow.  Please do not simply re-ask the question on Stack Overflow.

– Scott
Feb 10 at 19:24













The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

– elgonzo
Feb 11 at 13:57







The exception you got says "The given path's format is not supported". The "given path" here means simply the "given audio file". Thus, the error in other words: "The given audio files's format is not supported". Now, i don't know the limitations of System.Media.SoundPlayer, but clearly it does not accept that particular audio file (maybe it is because the WAV file in question is 32 bit, or has an uncommon channel number, or whatever; i am just speculating here about possible SoundPlayer limitations; perhaps playback of this WAV would demand a codec that's not installed on your machine)

– elgonzo
Feb 11 at 13:57














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54631853%2fc-sharp-audio-directory-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown
























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54631853%2fc-sharp-audio-directory-issue%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕