![]() I can assist you in submitting this code to the Fusionpbx project on github, or if you don't care I can submit it for you can give you a shout out! If (transcribe_json) thenįnsoleLog("notice", " TRANSCRIPTION: json error \n") row įnsoleLog("notice", " TRANSCRIPTION: ". If (transcribe_json ~= nil) thenįor key, row in pairs(transcribe_json) do Status, transcribe_json = pcall(code, transcribe_result) įnsoleLog("notice", " error decoding watson json\n") Now we just have to see how much Watson will cost when the rubber hits the road, but so far the accuracy has been very good. ![]() Transcription = transcribe_json Ĭonfidence = transcribe_json įnsoleLog("notice", " message too short for transcription.\n") If (transcribe_json = nil) thenįnsoleLog("notice", " CONFIDENCE: (null) \n") įnsoleLog("notice", " CONFIDENCE: ". Local transcribe_json = code(transcribe_result) įnsoleLog("notice", " TRANSCRIPTION: (null) \n") įnsoleLog("notice", " TRANSCRIPTION: ". Local transcribe_result = handle:read("*a") įnsoleLog("notice", " CMD: ". Transcribe_cmd = ].api_key.].transcription_server.] Local transcription_server = settings:get('voicemail', 'transcription_server', 'text') or '' Local api_key = settings:get('voicemail', 'api_key', 'text') or '' "\n") įnsoleLog("notice", " transcribe_language: ". Transcribe_language = settings:get('voicemail', 'transcribe_language', 'text') or 'en-US' įnsoleLog("notice", " transcribe_provider: ". Local transcribe_provider = settings:get('voicemail', 'transcribe_provider', 'text') or '' Local function transcribe(file_path,settings,start_epoch) You can also just modify the current record_a by inserting the relevant bits in to the transcribe function, as below: Uplaod the file attached and make sure the ownership and permissions are correct. Make a backup of /usr/share/freeswitch/scripts/app/voicemail/resources/functions/record_a by renaming it. Then navigate to Status => Sip Status and click the "Flush Cache" button and "Reload Xml" buttonĪlso make sure transcription is set to true in your voicemail box Now at the top of the page click the "reload" button. Sub: transcription_server type: text Value: Sub: transcribe_provider Type: text Value: watson Enabled: true Sub: transcibe_language Type: text Value: en-US Enabled: true Sub: json_enabled Type: boolean Value: true Enabled: true Sub: api_key Type: text Value: Enabled: true Next in the Fusion PBX GUI got to Advanced => Default Settings and scroll down to the voicemail section. Anyway here goes:įirst go get an acocount and API key from the IBM Watson speech to text site here: Honestly its not that hard but I didn't know how to script in lua so it was painful. OK, so after a week of learning lua and hacking and slashing, I have a working script for IBM Watson speech to text voicemail transcription for Fusion PBX ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |