Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

32
LINES

< > BotCompany Repo | #1026880 // Recognito Test [voice identification]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 936K of libraries. Click here for Pure Java version (4180L/23K).

1  
!7
2  
3  
lib 1400325 // recognito
4  
5  
import com.bitsinharmony.recognito.*;
6  
import com.bitsinharmony.recognito.MatchResult;
7  
8  
cmodule RecognitoTest > DynPrintLog {
9  
  start-thread {
10  
    // Create a new Recognito instance defining the audio sample rate to be used
11  
    Recognito<S> recognito = new(16000.0f);
12  
    
13  
    File wav1 = loadLibrary(#1400328);
14  
    File wav2 = loadLibrary(#1400329);
15  
    File wav3 = loadLibrary(#1400330);
16  
    File wav4 = javaxDataDir("Recordings/16k/20200131-185521.wav");
17  
    File wav5 = javaxDataDir("Recordings/16k/20200131-190327.wav"); // Stefan
18  
    File wav6 = javaxDataDir("Recordings/16k/20200131-190504.wav");
19  
    File wav7 = javaxDataDir("Recordings/16k/20200131-190615.wav"); // Stefan
20  
21  
    VoicePrint print1 = recognito.createVoicePrint("Stefan", wav5);
22  
    VoicePrint print2 = recognito.createVoicePrint("Other guy", wav2);
23  
    VoicePrint print3 = recognito.createVoicePrint("IKEA 1", wav4);
24  
25  
    for (File wav : ll(wav6, wav7)) {
26  
      L<MatchResult<S>> matches = recognito.identify(wav);
27  
      for (MatchResult match : matches)
28  
        print("Match: " + match.getKey() + " - " + match.getLikelihoodRatio() + "%");
29  
      print();
30  
    }
31  
  }
32  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026880
Snippet name: Recognito Test [voice identification]
Eternal ID of this version: #1026880/12
Text MD5: 7a6448e6fd78487e7acfd930c07bf017
Transpilation MD5: db5ecfd270940c2ba5f946836dc74754
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-31 19:07:07
Source code size: 1200 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 180 / 423
Version history: 11 change(s)
Referenced in: [show references]