From 7bab62309030f895f436cbfdb000166bf754725b Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 28 Nov 2023 16:50:17 -0800 Subject: [PATCH] Add cli entrypoint to get languages Update Docker config to default to use language API --- docker_overlay/etc/neon/neon.yaml | 11 +---------- neon_iris/cli.py | 8 ++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docker_overlay/etc/neon/neon.yaml b/docker_overlay/etc/neon/neon.yaml index 0a48cef..6f5df2c 100644 --- a/docker_overlay/etc/neon/neon.yaml +++ b/docker_overlay/etc/neon/neon.yaml @@ -12,16 +12,7 @@ iris: server_address: "0.0.0.0" server_port: 7860 default_lang: en-us - languages: - - en-us - - fr-fr - - es-es - - de-de - - it-it - - uk-ua - - nl-nl - - pt-pt - - ca-es + enable_lang_api: True location: city: diff --git a/neon_iris/cli.py b/neon_iris/cli.py index cefba9c..735e184 100644 --- a/neon_iris/cli.py +++ b/neon_iris/cli.py @@ -141,6 +141,14 @@ def start_gradio(): click.echo("Unable to connect to MQ server") +@neon_iris_cli.command(help="Query Neon Core for supported languages") +def get_languages(): + from neon_iris.util import query_neon + _print_config() + resp = query_neon("neon.languages.get", {}) + click.echo(pformat(resp)) + + @neon_iris_cli.command(help="Transcribe an audio file") @click.option('--lang', '-l', default='en-us', help="language of input audio")