Skip to content

Commit 1237afd

Browse files
committed
Added support for generating javadoc and source archives
1 parent ba6db2e commit 1237afd

File tree

9 files changed

+44
-18
lines changed

9 files changed

+44
-18
lines changed

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,30 @@
5151
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
5252
</configuration>
5353
</plugin>
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-source-plugin</artifactId>
57+
<executions>
58+
<execution>
59+
<id>attach-sources</id>
60+
<goals>
61+
<goal>jar</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-javadoc-plugin</artifactId>
69+
<executions>
70+
<execution>
71+
<id>attach-javadocs</id>
72+
<goals>
73+
<goal>jar</goal>
74+
</goals>
75+
</execution>
76+
</executions>
77+
</plugin>
5478
</plugins>
5579
</pluginManagement>
5680
</build>

src/main/java/com/darkprograms/speech/microphone/Microphone.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ private void initTargetDataLine(){
117117
*
118118
* @param audioFile The File to save the audio to
119119
* @throws LineUnavailableException
120-
* @throws Exception Throws an exception if something went wrong
121120
*/
122121
public void captureAudioToFile(File audioFile) throws LineUnavailableException {
123122
setState(CaptureState.STARTING_CAPTURE);
@@ -138,7 +137,6 @@ public void captureAudioToFile(File audioFile) throws LineUnavailableException {
138137
*
139138
* @param audioFile The fully path (String) to a file you want to save the audio in
140139
* @throws LineUnavailableException
141-
* @throws Exception Throws an exception if something went wrong
142140
*/
143141
public void captureAudioToFile(String audioFile) throws LineUnavailableException {
144142
File file = new File(audioFile);

src/main/java/com/darkprograms/speech/microphone/MicrophoneAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Microphone Analyzer class, detects pitch and volume while extending the microphone class.
88
* Implemented as a precursor to a Voice Activity Detection (VAD) algorithm.
99
* Currently can be used for audio data analysis.
10-
* Dependencies: FFT.java & Complex.java. Both found in the utility package.
10+
* Dependencies: FFT.java and Complex.java. Both found in the utility package.
1111
* @author Aaron Gokaslan
1212
********************************************************************************************/
1313

src/main/java/com/darkprograms/speech/recognizer/GSpeechDuplex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,15 @@ private String parseTranscript(String s){
472472

473473
/**
474474
* Adds GSpeechResponse Listeners that fire when Google sends a response.
475-
* @param The Listeners you want to add
475+
* @param rl The Listeners you want to add
476476
*/
477477
public synchronized void addResponseListener(GSpeechResponseListener rl){
478478
responseListeners.add(rl);
479479
}
480480

481481
/**
482482
* Removes GSpeechResponseListeners that fire when Google sends a response.
483-
* @param rl
483+
* @param rl The Listeners you want to remove
484484
*/
485485
public synchronized void removeResponseListener(GSpeechResponseListener rl){
486486
responseListeners.remove(rl);

src/main/java/com/darkprograms/speech/recognizer/Recognizer.java

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ private Recognizer() {
133133

134134
/**
135135
* Constructor
136-
* @param Language
136+
* @param language
137+
* @param apikey
137138
*/
138139
@Deprecated
139140
public Recognizer(String language, String apikey) {
@@ -144,6 +145,7 @@ public Recognizer(String language, String apikey) {
144145
/**
145146
* Constructor
146147
* @param language The Languages class for the language you want to designate
148+
* @param apikey
147149
*/
148150
public Recognizer(Languages language, String apikey){
149151
this.language = language.languageCode;
@@ -153,6 +155,7 @@ public Recognizer(Languages language, String apikey){
153155
/**
154156
* Constructor
155157
* @param profanityFilter
158+
* @param apikey
156159
*/
157160
public Recognizer(boolean profanityFilter, String apikey){
158161
this.profanityFilter = profanityFilter;
@@ -163,6 +166,7 @@ public Recognizer(boolean profanityFilter, String apikey){
163166
* Constructor
164167
* @param language
165168
* @param profanityFilter
169+
* @param apikey
166170
*/
167171
@Deprecated
168172
public Recognizer(String language, boolean profanityFilter, String apikey){
@@ -175,6 +179,7 @@ public Recognizer(String language, boolean profanityFilter, String apikey){
175179
* Constructor
176180
* @param language
177181
* @param profanityFilter
182+
* @param apikey
178183
*/
179184
public Recognizer(Languages language, boolean profanityFilter, String apikey){
180185
this.language = language.languageCode;
@@ -279,9 +284,9 @@ public GoogleResponse getRecognizedDataForFlac(File flacFile, int maxResults) th
279284
*
280285
* @param flacFile FLAC file to recognize
281286
* @param maxResults the maximum number of results to return in the response
282-
* @param samepleRate The sampleRate of the file. Default is 8000.
283-
* @return Returns a GoogleResponse, with the response and confidence score
284-
* @throws IOException Throws exception if something goes wrong
287+
* @param sampleRate The sampleRate of the file. Default is 8000.
288+
* @return GoogleResponse with the response and confidence score
289+
* @throws IOException if something goes wrong
285290
*/
286291
public GoogleResponse getRecognizedDataForFlac(File flacFile, int maxResults, int sampleRate) throws IOException{
287292
String [] response = rawRequest(flacFile, maxResults, sampleRate);
@@ -295,9 +300,9 @@ public GoogleResponse getRecognizedDataForFlac(File flacFile, int maxResults, in
295300
*
296301
* @param flacFile FLAC file to recognize
297302
* @param maxResults the maximum number of results to return in the response
298-
* @param samepleRate The sampleRate of the file. Default is 8000.
299-
* @return Returns a GoogleResponse, with the response and confidence score
300-
* @throws IOException Throws exception if something goes wrong
303+
* @param sampleRate The sampleRate of the file. Default is 8000.
304+
* @return GoogleResponse, with the response and confidence score
305+
* @throws IOException if something goes wrong
301306
*/
302307
public GoogleResponse getRecognizedDataForFlac(String flacFile, int maxResults, int sampleRate) throws IOException{
303308
return getRecognizedDataForFlac(new File(flacFile), maxResults, sampleRate);

src/main/java/com/darkprograms/speech/recognizer/RecognizerChunked.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void getRecognizedDataForFlac(File infile, int sampleRate) throws IOExcep
105105

106106
/**
107107
* Analyzes the file for speech
108-
* @param infile The file you want to analyze for speech.
108+
* @param inFile The file you want to analyze for speech.
109109
* @param sampleRate The sample rate of the audioFile.
110110
* @throws IOException if something goes wrong reading the file.
111111
*/
@@ -279,4 +279,4 @@ private synchronized void fireResponseEvent(GoogleResponse gr){
279279
}
280280
}
281281

282-
}
282+
}

src/main/java/com/darkprograms/speech/synthesiser/Synthesiser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private boolean isEndingPunctuation(char input){
231231
* Automatically determines the language of the original text
232232
* @param text represents the text you want to check the language of
233233
* @return the languageCode in ISO-639
234-
* @throws Exception if it cannot complete the request
234+
* @throws IOException if it cannot complete the request
235235
*/
236236
public String detectLanguage(String text) throws IOException{
237237
return GoogleTranslate.detectLanguage(text);

src/main/java/com/darkprograms/speech/synthesiser/SynthesiserV2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ private boolean isEndingPunctuation(char input){
276276
* Automatically determines the language of the original text
277277
* @param text represents the text you want to check the language of
278278
* @return the languageCode in ISO-639
279-
* @throws Exception if it cannot complete the request
279+
* @throws IOException if it cannot complete the request
280280
*/
281281
public String detectLanguage(String text) throws IOException{
282282
return GoogleTranslate.detectLanguage(text);
@@ -300,4 +300,4 @@ public InputStream call() throws IOException{
300300
}
301301
}
302302

303-
}
303+
}

src/main/java/com/darkprograms/speech/translator/GoogleTranslate.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public final class GoogleTranslate { //Class marked as final since all methods a
3434
* Useful for UI Strings
3535
* @param languageCode The ISO639-1
3636
* @return The language in the user's default language
37-
* @see {@link #detectLanguage}
3837
*/
3938
public static String getDisplayLanguage(String languageCode){
4039
return (new Locale(languageCode)).getDisplayLanguage();

0 commit comments

Comments
 (0)