Skip to content
Snippets Groups Projects
Select Git revision
  • b9404478e329ea5389b0c57c4b419f3b16f6742d
  • without_tipselection default
  • develop protected
  • fix/grafana-local-dashboard
  • wasp
  • fix/dashboard-explorer-freeze
  • master
  • feat/timerqueue
  • test/sync_debug_and_650
  • feat/sync_revamp_inv
  • wip/sync
  • tool/db-recovery
  • portcheck/fix
  • fix/synchronization
  • feat/new-dashboard-analysis
  • feat/refactored-analysis-dashboard
  • feat/new-analysis-dashboard
  • test/demo-prometheus-fpc
  • prometheus_metrics
  • wip/analysis-server
  • merge/fpc-test-value-transfer
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
28 results

tangle.go

Blame
  • test_majordom.c 1.87 KiB
    
    #include <stdio.h>
    #include <string.h>
    #include <assert.h>
    
    
    #include <sphinxbase/err.h>
    #include <sphinxbase/ad.h>
    
    #include "pocketsphinx.h"
    
    
    #include "majordom.h"
    
    
    static const arg_t cont_args_def[] = {
        POCKETSPHINX_OPTIONS,
        /* Argument file. */
        {"-argfile",
         ARG_STRING,
         NULL,
         "Argument file giving extra arguments."},
        {"-adcdev",
         ARG_STRING,
         NULL,
         "Name of audio device to use for input."},
        {"-infile",
         ARG_STRING,
         NULL,
         "Audio file to transcribe."},
        {"-inmic",
         ARG_BOOLEAN,
         "no",
         "Transcribe audio from microphone."},
        {"-time",
         ARG_BOOLEAN,
         "no",
         "Print word times in file transcription."},
        {"-address",
         ARG_STRING,
         "224.0.29.200",
         "IP multicast address of the xAAL bus." },
        {"-port",
         ARG_STRING,
         "1234",
         "UDP port of the xAAL bus." },
        {"-hops",
         ARG_INT32,
         "-1",
         "IP packets hops count of the xAAL bus."},
        {"-secret",
         ARG_STRING,
         "",
         "Secret passphrase the xAAL bus."},
        {"-uuid",
         ARG_STRING,
         "ddbaccfd-fa43-43c7-9eb3-6a21379590a5",
         "xAAL address (uuid) of the majordom device."},
        {"-dbfile",
         ARG_STRING,
         "majordom.db",
         "Database of xAAL devices discoverd by majordom."},
        {"-translatedic",
         ARG_STRING,
         "translate.dic",
         "Dictionnary of transaltion from natural commands to xAAL."},
        CMDLN_EMPTY_OPTION
    };
    
    static cmd_ln_t *config;
    
    
    
    int main(int argc, char *argv[]) {
      translates_t dictionnary;
      cmds_t cmds;
      xaal_ctx_t xaal_ctx;
      char *hyp;
      size_t n;
    
      config = cmd_ln_parse_r(NULL, cont_args_def, argc, argv, TRUE);
    	
      majordom_init(config, &dictionnary, &cmds, &xaal_ctx);
    
      for (;;) {
        hyp = NULL; n = 0;
        if (getline(&hyp, &n, stdin)<=1)
          break;
    
        printf("%s\n", hyp);
        majordomus(hyp, &dictionnary, &cmds, &xaal_ctx);
      }
      return 0;
    }