Commit e180453
Eric Wheeler
Reload --vosk-grammar-file JSON on SIGHUP
This commit adds support for reloading the grammar configuration on SIGHUP.
This is accomplished by moving the recognizer initialization into its own
function so that the signal handler can call it on reload.
A reload of the recognizer is fast because it does not reload the model and
only applies the grammar.
Signed-off-by: Eric Wheeler <vosk-git@z.ewheeler.org>1 parent ddac32a commit e180453
1 file changed
Lines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | 942 | | |
949 | 943 | | |
950 | 944 | | |
951 | 945 | | |
952 | 946 | | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
957 | 965 | | |
958 | 966 | | |
959 | 967 | | |
| |||
1119 | 1127 | | |
1120 | 1128 | | |
1121 | 1129 | | |
| 1130 | + | |
1122 | 1131 | | |
1123 | 1132 | | |
1124 | 1133 | | |
| |||
0 commit comments