Query

How to query Emy storage

Once you have stored audio fingerprints, you are ready to search them.

The query audio files can come from a variety of sources: microphone, stream capture, mobile device, etc. It's up to your application where you get the query samples.

// use FFmpegAudioService
var audioService = new FFmpegAudioService();

// query file
string queryAudioFile = "query.mp3";

// connect to Emy on port 3399
var emyModelService = EmyModelService.NewInstance("localhost", 3399);
  
 // query Emy database
var queryResult = await QueryCommandBuilder.Instance.BuildQueryCommand()
                                          .From(queryAudioFile)
                                          .UsingServices(modelService, audioService)
                                          .Query();
 					
 // register matches such that they appear in the dashboard					
 emyModelService.RegisterMatches(queryResult.ResultEntries);

In order to register matches back to Emy storage, you can invoke RegisterMatches, making them searchable in the backoffice.
Matches are stored for 7 days.