public static synchronized JMenu createFileMenu(){
	    JMenu fileMenu = new JMenu("File");

        // Open File
        JMenuItem item = MenuBarUtils.createItem("Open", "open.png", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                FileSummary fileSummary = FileUtils.openFile();

                if (fileSummary != null) {
                    // Once a new file is opened - set the ActionToolbar to end state
                    RecognizerActionToolbar.getInstance().setResetState();

                    // Adjust the text window in order to reflect the loaded file
                    TextWindow.getInstance().setTitle(fileSummary.getFileName());
                    // Replace the digits for its equivalent digits
                    TextWindow.getInstance().setText(FileUtils.replaceDigitsForText(fileSummary.getFileData().toString()));
                    TextWindow.getInstance().setWidth(fileSummary.getMaximumWidth());
                    TextWindow.getInstance().update();

                    // Whenever a file is open update the text to recognize for the LiveRecognizer
                    if (fileSummary.getFileData().toString() != null && !fileSummary.getFileData().toString().trim().isEmpty()) {
                        // Make sure that there's a Sphinx Configuration file
                        if(SpeechManager.getInstance().getSpeechConfiguration() == null){
                            // Retrieve the configuration from the software.properties file.
                            String languageModel =
                                    SpeechManager.getInstance().setAndVerifyLanguageModel(
                                                                    GlobalProperties.getInstance().getProperty("sphinx.languageModel"));
                            // Set up the Grammar Configuration
                            SpeechManager.getInstance().setSpeechConfiguration(
                                    GlobalProperties.getInstance().getProperty(
                                            "speechManager.speechConfiguration." + languageModel, // Grammar Configuration
                                            SpeechManager.GRAMMAR_MODEL)); // Provide a default configuration if the above doesn't work
                        }
                        // The current Sphinx configuration is selected by the Sphinx Configuration Panel 'configuration' drop down
                        // Do not leave the user waiting until the grammar is created
                        SwingUtilities.invokeLater(new Runnable(){
                            public void run(){
                                // Allocate Sphinx4 for recognition
                                SpeechManager.getInstance().configureRecognizer();
                            }
                        });
                        // Reset the values of the property file
                        ConfigurationWindow.getInstance().resetNumberOfMessagesToBeRepeated();
                    } else {
                        // Display Error Message stating that the file is empty or there's nothing to recognize
                        JOptionPane.showMessageDialog(null, "File [" + fileSummary.getFileName() + "] is empty!",
                                "SpeechManager Error", JOptionPane.ERROR_MESSAGE);
                    }
                }
            }
        });
        item.setMnemonic('O');
        item.setAccelerator(KeyStroke.getKeyStroke('O', CTRL_DOWN_MASK));
        fileMenu.add(item);

        // Open Audio File
        boolean openAudio = GlobalProperties.getInstance().getPropertyAsBoolean("menuBar.openAudio");
        if(openAudio){
            JMenu audioMenu = MenuBarUtils.createMenu("Play Audio", "electronic-wave.png");
            // Play data that is held in the microphone
            item = MenuBarUtils.createItem("Microphone data", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    // Only allow the user to open the audio file if there's no recording going on
                    if(!SpeechManager.getInstance().isMicrophoneRecording()){
                        AudioPlayerWindow audioPlayerWindow = new AudioPlayerWindow(TextWindow.getInstance());
                        audioPlayerWindow.setLastOpenPath(ConfigurationWindow.getInstance().getPathToStoreAudioFile());
                        // ---------- Will play microphone data ---------- //
                        //Pass the name of the files being read and the microphone data to the audio player gui
                        String recognizerName = SpeechManager.getInstance().getLiveRecognizerName();
                        audioPlayerWindow.setFullNameOfAudioToPlay(recognizerName != null ? recognizerName : "[No recorded audio to be played]");
                        audioPlayerWindow.setMicrophoneData(SpeechManager.getInstance().getCompleteMicrophoneAudioStream());
                        // ---------- Will display visual audio data ---------- //
                        // Pass Sphinx properties to the AudioPlayer - will help retrieving audio information to draw the Audio and Spectrogram panel
                        audioPlayerWindow.setPropertySheet(SpeechManager.getInstance().getPropertySheet());
                        // Display the audio wave
                        audioPlayerWindow.setDisplayVisualAudio(GlobalProperties.getInstance().getPropertyAsBoolean("audioPlayerWindow.displayVisualAudio"));
                        // Never display the open button - Display the gui
                        audioPlayerWindow.displayAudioPlayerWindowWithOpenButton(false);
                    }
                }
            });
            item.setMnemonic('M');
            item.setToolTipText("Play the last recorded data");
            item.setAccelerator(KeyStroke.getKeyStroke('P', CTRL_DOWN_MASK));
            audioMenu.add(item);
            // Search for an audio file and play it
            item = MenuBarUtils.createItem("Search...", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    // Only allow the user to open the audio file if there's no recording going on
                    if(!SpeechManager.getInstance().isMicrophoneRecording()){
                        AudioPlayerWindow audioPlayerWindow = new AudioPlayerWindow(TextWindow.getInstance());
                        audioPlayerWindow.setLastOpenPath(ConfigurationWindow.getInstance().getPathToStoreAudioFile());
                        // Display the gui
                        audioPlayerWindow.displayAudioPlayerWindowWithOpenButton();
                    }
                }
            });
            item.setMnemonic('S');
            item.setToolTipText("Only MP3 format is supported!");
            item.setAccelerator(KeyStroke.getKeyStroke('F', CTRL_DOWN_MASK));
            audioMenu.add(item);

            fileMenu.add(audioMenu);
        }

        // Add Separator
        fileMenu.addSeparator();

        // Set up the Exit button
        item = MenuBarUtils.createItem("Exit", null, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
        item.setMnemonic('E');
        item.setAccelerator(KeyStroke.getKeyStroke('E', CTRL_DOWN_MASK));
        fileMenu.add(item);

	    return fileMenu;
    }