{"action":"closed","issue":{"url":"https://api.github.com/repos/lkuza2/java-speech-api/issues/56","labels_url":"https://api.github.com/repos/lkuza2/java-speech-api/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/lkuza2/java-speech-api/issues/56/comments","events_url":"https://api.github.com/repos/lkuza2/java-speech-api/issues/56/events","html_url":"https://github.com/lkuza2/java-speech-api/issues/56","id":52791629,"number":56,"title":"java.io.FileNotFoundException: AudioTestNow.flac (The requested operation cannot be performed on a file with a user-mapped section open)","user":{"login":"AdamuKaapan","id":2459833,"avatar_url":"https://avatars.githubusercontent.com/u/2459833?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamuKaapan","html_url":"https://github.com/AdamuKaapan","followers_url":"https://api.github.com/users/AdamuKaapan/followers","following_url":"https://api.github.com/users/AdamuKaapan/following{/other_user}","gists_url":"https://api.github.com/users/AdamuKaapan/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamuKaapan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamuKaapan/subscriptions","organizations_url":"https://api.github.com/users/AdamuKaapan/orgs","repos_url":"https://api.github.com/users/AdamuKaapan/repos","events_url":"https://api.github.com/users/AdamuKaapan/events{/privacy}","received_events_url":"https://api.github.com/users/AdamuKaapan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-24T02:40:42Z","updated_at":"2015-02-20T17:27:09Z","closed_at":"2015-02-20T17:27:09Z","body":"When following <a href=\"https://github.com/lkuza2/java-speech-api/wiki/How-to-use-this-API-for-passive-listening\">this tutorial</a> that you have written, but slightly modified to use the V2 speech API (GSpeechDuplex) instead of the V1 API shown in the tutorial, I get this error: java.io.FileNotFoundException: AudioTestNow.flac (The requested operation cannot be performed on a file with a user-mapped section open)\r\nNo line is given that is inside my code. However, it still gets a response from the server (and is correct).\r\n\r\nThe modified code from the tutorial:\r\n```Java\r\nGSpeechDuplex dup = new GSpeechDuplex(API_KEY);\r\ndup.addResponseListener((GoogleResponse gr) ->\r\n{\r\n    displayResponse(gr);\r\n});\r\ndup.recognize(mic.getAudioFile(), (int)mic.getAudioFormat().getSampleRate());\r\n```\r\n\r\nIn case you want it, here's the full log:\r\n\r\njava.io.FileNotFoundException: AudioTestNow.flac (The requested operation cannot be performed on a file with a user-mapped section open)\r\n\tat java.io.FileOutputStream.open(Native Method)\r\n\tat java.io.FileOutputStream.<init>(FileOutputStream.java:213)\r\n\tat java.io.FileOutputStream.<init>(FileOutputStream.java:162)\r\n\tat javaFlacEncoder.FLACFileOutputStream.<init>(FLACFileOutputStream.java:53)\r\n\tat javaFlacEncoder.FLACFileWriter.write(FLACFileWriter.java:102)\r\n\tat javax.sound.sampled.AudioSystem.write(AudioSystem.java:1356)\r\n\tat com.darkprograms.speech.microphone.Microphone$CaptureThread.run(Microphone.java:228)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\nLet me know if you need any more information."}}