\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{url}
\usepackage{textcomp}
\usepackage{color}
\usepackage{longtable}
\usepackage[T1]{fontenc}
\usepackage{enumerate}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{stackengine}
\captionsetup[figure]{labelformat=empty}
\captionsetup[table]{labelformat=empty}
\topmargin -1.5cm        
\oddsidemargin -0.04cm   
\evensidemargin -0.04cm  
\textwidth 16.59cm
\textheight 24.94cm
\title{AudioGUI software manual}  
\date{}
\author{}
\begin{document}
\maketitle


\tableofcontents


\newpage
\section{Installing the microphone}

We recommend using a good microphone, such as the Scarlett+sE X1 microphone. The application does work with build-in microphone but the audio quality probably will be poor.

\begin{itemize}
\item Attach the microphone cable to the Scarlett 2i2 USB interface (Fig.1). You need only 1 microphone as the application  uses mono audio. Usually for mono recording you need to attach to the left channel / first channel / channel 0.
\item Attach the USB cable from the Scarlett 2i2 USB interface to your computer.
\end{itemize}

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=.6\textwidth]{scarlett.jpg}}{\small{\textit{Fig.1 - Scarlett 2i2 USB interface}}}
\end{figure}


\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=.5\textwidth]{sex1.jpg}}{\small{\textit{Fig.2 - sE X1 Microphone}}}
\end{figure}


\subsection{Mac OS X }


\subsubsection{Choosing the right input}

\begin{itemize}
\item Start \textbf{System Preferences}.
\item Choose \textbf{Sound}.
\item Choose \textbf{Input}.
\item Choose \textbf{Scarlett 2i2 USB} (see Fig.3).
\end{itemize}

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=.8\textwidth]{soundchoice.eps}}{\small{\textit{Fig.3 - System Preferences Sound configuration}}}
\end{figure}
~
\newline
\newline
\newline


\subsection{Windows}
This section describes how to install the Scarlett 2i2 driver in Windows.

\subsubsection{Driver download and install}
Download and install the Scarlett 2i2 Windows driver at the Focusrite website (Fig.4): 
\newline
\url{https://us.focusrite.com/downloads}

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=0.8\textwidth]{downloadwin.eps}}{\small{\textit{Fig.4 - Download the driver}}}
\end{figure}


\subsubsection{Sound configuration}

\begin{itemize}
\item Go to the \textbf{Control Panel} and choose \textbf{Hardware and Sound}, \textbf{Devices and Printers}.
\item Right-click the  \textbf{Scarlett 2i2 USB} device and choose \textbf{Properties}. See Fig.5.
\end{itemize}


\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=0.8\textwidth]{deviceswin2.eps}}{\small{\textit{Fig.5 -  Devices and Printers}}}
\end{figure}


~
\newline
Be sure that the Scarlett 2i2 device is visible in the \textbf{Properties} See Fig.6.

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=0.4\textwidth]{line-inwin.eps}}{\small{\textit{Fig.6 -  Device Properties}}}
\end{figure}

~
\newline
\begin{itemize}
\item Go to \textbf{Control panel}, \textbf{Hardware and Sound} , \textbf{Sound} and choose \textbf{Recording}
\item Set the Scarlett 2i2 device as the default Line in device. See Fig.7.
\item Go to \textbf{Control panel}, \textbf{Hardware and Sound} , \textbf{Sound} and choose \textbf{Playback}
\item Set the computer Speakers as the default Playback device.
\end{itemize}

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=0.5\textwidth]{recordingwin.eps}}{\small{\textit{Fig.7 -  Recording and Playback settings}}}
\end{figure}
~
\newline
\newline
\newline




\section{Installing the software}
Perform the following steps to install the software
\begin{enumerate}
\item Install java 8 or higher (\url{http://www.oracle.com/technetwork/java/javase/downloads/index.html})
\item Install the audio device driver as discussed in the previous chapter.
\item Build the application with maven.
\item Copy the audiogui-1.0.4-jar-with-dependencies.jar and sentences.txt to a directory of your choice.
\end{enumerate}

\section{Using the Application}

Start the program by double-clicking the jar-file, or from the commandline using {{{java -jar audiogui-1.0.4.jar-with-dependencies.jar}}}. You now enter phase 1 of the process.

\subsection{Phase 1}
In phase 1 the user records the sentences.
\begin{itemize}
\item Phase 1 of the AudioGui user interface should appear on your screen (Fig. 8).
\item At the top of the screen is the sentence shown that has to be recorded.
\item Press the \textbf{Record} button and speak the sentence  in the microphone.
\item Stop recording by clicking the stop icon. The recording stops automatically after 30 seconds.
\item Check the peak indicator in the audio volume area. If it has come into the red area (> 3dB), then the recording has been clipped. If that happens, lower the recording volume. If it is way below 12dB, increase the recording volume. If you have to adjust the recording volume, re-record the sentence.
\item Press the \textbf{Play} button to check the recording quality. If not satisfied, record again.
\item If the recording is satisfactory, press the \textbf{Confirm} button, and the recording will be saved to a WAV-file on your computer. The files are saved in a new directory created in the system's current working directory (usually the directory where the application jar is located).
\item If all sentences have been recorded the program proceeds to phase 2.
\end{itemize}

\begin{figure}[H]
  \includegraphics[width=1.0\textwidth]{phase1.png}}{\small{\textit{Fig.8 -  The user interface. At the top the sentence to be spoken for recording. At the bottom from left to right the recording volume area, the record button, the play button and the confirm button. }}
\end{figure}

\subsection{Phase 2}
In phase two the user adjusts the audio filters.
\begin{itemize}
\item Phase 2 of the AudioGui user interface should appear on the screen (Fig. 9).
\item Press the play button to (re)play your last recording.
\item Drag the sliders until recording sounds properly.
\item If the setting is satisfactory, press the \textbf{Confirm} button. The settings are saved to a bend.xml file.
\item the program thanks you for participation and exits.
\end{itemize}

\begin{figure}[H]
  \stackunder[5pt]{\includegraphics[width=1.0\textwidth]{phase2.png}}{\small{\textit{Fig.9 -  Phase 2 of the user interface}}}
\end{figure}






\end{document}

