-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from pastore99/54-fix-lighten-loading-of-the-p…
…atients-homepage added javadoc for SpeechRecognition
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/model/service/exercise/SpeechRecognitionInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package model.service.exercise; | ||
|
||
import java.io.*; | ||
import java.util.concurrent.ExecutionException; | ||
|
||
|
||
public interface SpeechRecognitionInterface { | ||
|
||
/** | ||
* Effettua il riconoscimento vocale utilizzando i servizi di Azure Speech-to-Text. | ||
* | ||
* @param audio InputStream rappresentante l'audio da analizzare. | ||
* @return Una stringa contenente il testo riconosciuto, o null se non riconosciuto. | ||
* @throws InterruptedException se il thread viene interrotto durante l'esecuzione. | ||
* @throws ExecutionException se si verifica un errore durante l'esecuzione del task. | ||
* @throws IOException se si verifica un errore di input/output. | ||
*/ | ||
public String azureSTT(InputStream audio) throws InterruptedException, ExecutionException, IOException; | ||
|
||
/** | ||
* Genera un file temporaneo a partire da un InputStream. | ||
* | ||
* @param inputAudio InputStream dell'audio. | ||
* @return Il percorso del file temporaneo creato. | ||
* @throws IOException se si verifica un errore di input/output. | ||
*/ | ||
public String generateFile(InputStream inputAudio) throws IOException; | ||
} |