Home
%3CLINGO-SUB%20id%3D%22lingo-sub-781957%22%20slang%3D%22en-US%22%3EMine%20knowledge%20from%20audio%20files%20with%20Microsoft%20AI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-781957%22%20slang%3D%22en-US%22%3E%3CP%3EKnowledge%20Mining%20is%20a%20technique%20to%20extract%20insights%20from%20structured%20and%20unstructured%20data.%20In%20this%20context%2C%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fsearch%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Search%3C%2FA%3Eis%20the%20standard%20Microsoft%20Knowledge%20Mining%20service%2C%20that%20uses%20AI%20to%20create%20metadata%20about%20images%2C%20relational%20databases%2C%20and%20textual%20data%2C%20providing%20a%20web-like%20search%20experience.%20Audio%20is%20a%20data%20type%20that%20matters%20for%20companies%20in%20all%20industries%2C%20containing%20customer%20and%20business%20information.%20%26nbsp%3BIn%20this%20article%20you%20will%20learn%20how%20to%20combine%20these%20two%20separated%20worlds%20into%20one%20single%20search%20solution.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1795153699%22%20id%3D%22toc-hId-1795153699%22%3EThe%20challenge%20with%20audio%20data%20mining%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20can%20turn%20Azure%20Search%20into%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fsearch%2Fcognitive-search-concept-intro%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Cognitive%20Search%3C%2FA%3E%2C%20by%20adding%20an%20enrichment%20pipeline%20that%20creates%20meta%20data%20on%20images%20and%20text%20files.%20It%20pushes%20the%20created%20metadata%20into%20a%20Search%20Index%2C%20that%20contains%20pointers%20to%20the%20original%20data%20on%20its%20physical%20location%20on%20Azure.%20The%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fsearchservice%2Fsupported-data-types%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esupported%20data%20types%3C%2FA%3Eare%20Microsoft%20Office%20documents%2C%20PDFs%2C%20json%2C%20xml%2C%20and%20image%20formats%20like%20png%2C%20jpg%2C%20and%20more.%20Those%20images%20may%20have%20a%20scene%20that%20will%20be%20tagged%20and%20described%2C%20or%20text%20that%20will%20be%20extracted.%20The%20text%20in%20the%20images%20may%20also%20be%20handwritten%2C%20like%20a%20form%20or%20meeting%20notes%2C%20common%20situations%20in%20every%20business.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20audio%20data%20isn%E2%80%99t%20supported%2C%20and%20a%20company%20may%20want%20to%20search%20also%20for%20the%20content%20from%20podcasts%2C%20meetings%20recordings%2C%20call%20center%20phone%20calls%2C%20and%20so%20on.%20A%20possible%20solution%20would%20be%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fsearch%2Fcognitive-search-create-custom-skill-example%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ecustom%20skill%3C%2FA%3E.%20After%20the%20regular%20Cognitive%20Search%20pipeline%20for%20your%20standard%20supported%20documents%2C%20a%20second%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2Fcognitive-search-defining-skillset%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eskillset%3C%2FA%3Eis%20necessary.%20It%20would%20only%20extract%20physical%20metadata%20from%20the%20file%20and%20the%20custom%20skill%20would%20do%20the%20job.%20But%20today%2C%20August%202019%2C%20this%20approach%20has%20limitations%20on%20processing%20time%2C%20files%20sizes%2C%20and%20more.%20It%20will%20be%20addressed%20in%20a%20future%20blog%20post.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20possible%20solution%20for%20this%20challenge%20has%20two%20steps%2C%20%3CSTRONG%3Epre-processing%3C%2FSTRONG%3Eand%20a%20%3CSTRONG%3Elink-through%2C%3C%2FSTRONG%3Ethat%20will%20allow%20users%20not%20only%20to%20search%20from%20company%E2%80%99s%20recordings%20but%20also%20to%20have%20the%20%E2%80%9Cclick-to-open%E2%80%9D%20experience%2C%20like%20Microsoft%E2%80%99s%20%3CA%20href%3D%22https%3A%2F%2Fjfk-demo.azurewebsites.net%2F%23%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EJFK%3C%2FA%3Eor%20%3CA%20href%3D%22https%3A%2F%2Fe2ekm-web.azurewebsites.net%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Search%20Accelerator%3C%2FA%3Edemos.%20Let%E2%80%99s%20see%20the%20details%20below.%20The%20diagram%20below%20shows%20you%20how%20it%20will%20work.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125099i2B91E42EBC6F3095%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3EFigure%201%3A%20The%20traditional%20Cognitive%20Search%20diagram%2C%20with%20the%20addition%2C%20in%20grey%2C%20of%20the%20required%20audio%20files%20pre-processing%20step%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--757003262%22%20id%3D%22toc-hId--757003262%22%3EFirst%20Step%20-%20Pre-processing%20to%20extract%20textual%20data%20from%20the%20audio%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20first%20step%2C%20we%20need%20to%20extract%20textual%20data%20from%20the%20audio%20files%20%3CSTRONG%3Ebefore%3C%2FSTRONG%3Ethe%20Azure%20Cognitive%20Search%20enrichment%20pipeline.%20The%20process%20will%20feed%20the%20pipeline%20with%20json%20data%20containing%20the%20transcription%20of%20the%20audio%20files%2C%20a%20content%20that%20must%20be%20merged%20with%20the%20other%20files%20content%2C%20which%20happens%20just%20before%20the%20pipeline%20AI%20analysis%20like%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fsearch%2Fcognitive-search-skill-entity-recognition%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eentity%3C%2FA%3Eor%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fsearch%2Fcognitive-search-skill-keyphrases%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ekey%20phrases%3C%2FA%3Eextractions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20idea%20is%20also%20seen%20within%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fbot-service%2Fbot-service-channel-connect-directlinespeech%3Fview%3Dazure-bot-service-4.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Espeech%20support%20in%20a%20Bot%3C%2FA%3E%2C%20%26nbsp%3Bwith%20the%20help%20of%20the%20Microsoft%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fcognitive-services%2Fspeech-service%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESpeech%20SDK%3C%2FA%3E.%20It%20will%20convert%20the%20audio%20to%20text%2C%20and%20then%20you%20can%20integrate%20your%20bot%20with%20other%20%3CA%20href%3D%22http%3A%2F%2Fwww.azure.com%2Fcognitive%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Cognitive%20Services%3C%2FA%3E%2C%20like%20%3CA%20href%3D%22https%3A%2F%2Fwww.luis.ai%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELUIS%3C%2FA%3E%26nbsp%3Bfor%20language%20understanding%2C%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fcognitive-services%2Ftext-analytics%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EText%20Analytics%3C%2FA%3E%26nbsp%3Bfor%20information%20extraction%2C%20or%20%3CA%20href%3D%22https%3A%2F%2Fwww.qnamaker.ai%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EQ%26amp%3BA%20Maker%3C%2FA%3Efor%20knowledge%20base%3B%20%3CSTRONG%3Eall%20cognitive%20services%20are%20REST%20APIs%20that%20expect%20a%20textual%20input%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20implement%20this%20pre-processing%2C%20we%20will%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fcognitive-services%2Fspeech-to-text%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMicrosoft%20Speech%20to%20Text%20API%3C%2FA%3E%2C%20a%20cognitive%20service%20that%20will%20do%20the%20transformation%20we%20need%20to%20mine%20knowledge%20from%20business%20audio.%20This%20API%20offers%20a%20range%20of%20capabilities%20you%20can%20embed%20into%20your%20apps%20to%20support%20various%20transcription%20scenarios%2C%20including%20conversation%20transcription%2C%20speech%20transcription%2C%20and%20custom%20speech%20transcription.%20The%20audio%20files%20location%20is%20informed%20as%20a%20parameter%20of%20the%20API%20call%2C%20and%20the%20service%20will%20access%20the%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20code%20below%20allows%20you%20to%20submit%20your%20audio%20files%20to%20the%20API%20and%20get%20back%20the%20transcriptions%20in%20json%20files%20which%20has%20the%20name%20of%20the%20original%20recording%20file.%20This%20is%20key%20to%20allow%20the%20application%20to%20offer%20the%20%E2%80%9Cclick-to-open%E2%80%9D%20experience%2C%20what%20you%20will%20see%20in%20the%20next%20step%20of%20the%20solution%20for%20this%20challenge.%20To%20access%20to%20this%20code%20and%20sample%20files%2C%20click%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FRodrigossz%2FKM-w-Audio%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3Efor%20a%20GitHub%20lab%20that%20has%20all%20details%20necessary%20to%20accomplish%20this%20task.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125105iD372DFA2A7C1E966%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3EFigure%202%3A%20The%20script%20code%20to%20call%20the%20REST%20API%20for%20your%20audio%20files%20and%20get%20the%20transcription%20back.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20enterprise%20scenarios%2C%20it%20is%20necessary%20to%20use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fcognitive-services%2Fspeech-service%2Fbatch-transcription%23supported-formats%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EBatch%20Transcription%3C%2FA%3E%2C%20ideal%20for%20call%20centers%2C%20which%20typically%20accumulate%20thousands%20of%20hours%20of%20audio.%20It%20makes%20it%20easy%20to%20transcribe%20large%20volumes%20of%20audio%20recordings.%20By%20using%20the%20dedicated%20REST%20API%2C%20you%20can%20point%20to%20audio%20files%20with%20a%20shared%20access%20signature%20(SAS)%20URI%20and%20asynchronously%20receive%20transcriptions.%20It%20requires%20the%20S0%20(Standard)%20tier%20of%20the%20Speech%20Service%20and%20will%20allow%20you%20to%20process%20file%20types%20like%20wav%20and%20mp3%2C%20without%20data%20volume%20limitations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Cognitive%20Services%20team%20did%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fusing-text-analytics-in-call-centers%2Fpreview%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ea%20great%20blog%20post%3C%2FA%3Eon%20how%20to%20use%20the%20Text%20Analytics%20API%20on%20call%20center%20recordings.%20They%20used%20a%20similar%20architecture%2C%20with%20focus%20on%20Power%20BI%20dashboards%20for%20sentiment%20analysis%20and%20key%20phrases%2C%20instead%20of%20Cognitive%20Search.%20An%20interesting%20approach%20is%20to%20leverage%20both%20designs%20to%20create%20the%20best%20solution%20for%20your%20needs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-985807073%22%20id%3D%22toc-hId-985807073%22%3ESecond%20Step%20%E2%80%93%20Link-through%20for%20a%20%E2%80%9Cclick-to-open%E2%80%9D%20experience%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20you%20have%20the%20transcriptions%2C%20if%20you%20upload%20the%20json%20data%20to%20the%20same%20location%20of%20the%20rest%20of%20your%20dataset%2C%20it%20will%20be%20submitted%20for%20all%20AI%20processes%20you%20defined%20for%20your%20dataset.%20And%20the%20created%20metadata%20will%20be%20available%20for%20search%20in%20an%20inverted%20index%2C%20the%20theory%20behind%20Azure%20Search%20incredible%20performance.%20%3CSTRONG%3EBut%20the%20enrichment%20pipeline%20will%20index%20the%20json%20file%2C%20not%20the%20original%20audio%3C%2FSTRONG%3E.%20That%20means%2C%20in%20a%20click-to-open%20solution%2C%20the%20user%20will%20read%20the%20json%20file%20text%20instead%20of%20listening%20to%20the%20original%20recording.%20Here%20are%20the%20required%20actions%20to%20fix%20it%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EFirst%2C%3C%2FSTRONG%3Ecreate%20an%20azure%20search%20index%20with%20a%20field%20exclusive%20for%20the%20audio%20files%20URL%20location.%20This%20action%20can%20be%20done%20together%20with%20the%20previous%20step%2C%20when%20you%20do%20the%20index%20creation%2C%20or%20after%20the%20first%20execution%20of%20the%20pipeline%2C%20once%2C%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fsearchservice%2Fupdate-index%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eupdate%20index%3C%2FA%3EThis%20field%20will%20only%20be%20filled%20for%20audio%20files%20and%20it%20is%20a%20good%20idea%20to%20use%20a%20name%20that%20suggests%20this%2C%20like%20%E2%80%9C%3CSTRONG%3E%3CEM%3EaudioFileUrlLocation%3C%2FEM%3E%3C%2FSTRONG%3E%E2%80%9D.%20This%20file%20will%20be%20null%20for%20all%20non-audio%20files%20in%20your%20dataset.%20Tip%3A%20It%20is%20useful%20to%20have%20the%20audio%20files%20in%20the%20same%20storage%20account%20that%20you%20are%20using%20for%20the%20other%20documents%2C%20because%20your%20application%20won%E2%80%99t%20need%20to%20deal%20with%20another%20string%20connection.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ESecond%2C%3C%2FSTRONG%3Epopulate%20this%20field%2C%20which%20can%20be%20done%20with%20another%20script.%20With%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Frest%2Fapi%2Fsearchservice%2FAddUpdate-or-Delete-Documents%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edocument%20update%3C%2FA%3Emethod%2C%20you%20can%20update%20the%20field%20mentioned%20above%20with%20the%20real%20location%20of%20the%20audio%20files.%20That%E2%80%99s%20why%20the%20original%20file%20name%20within%20the%20json%20file%20name%20is%20so%20important.%20It%20will%20help%20the%20link-through%20process%20connect%20the%20index%20information%20to%20the%20correct%20audio%20data%20source%20location.%20Your%20script%20will%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EDo%20an%20Azure%20Search%20query%20to%20get%20the%20audio%20transcriptions%20keys%2C%20required%20to%20update%20only%20one%20document%20in%20the%20index.%20It%20is%20required%20to%20retrieve%20the%20id%20and%20the%20%3CSTRONG%3Emetadata_storage_name%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EFor%20each%20audio%20document%2C%20find%20its%20key%20parsing%20the%20%3CSTRONG%3Emetadata_storage_name%3C%2FSTRONG%3E%2C%20simply%20removing%20the%20%3CSTRONG%3E%E2%80%9C.json%E2%80%9D%3C%2FSTRONG%3Eextensions%3C%2FLI%3E%0A%3CLI%3ESubmit%20a%20%E2%80%9Cmerge%E2%80%9D%20for%20each%20audio%20document%2C%20with%20a%20body%20definition%20that%20you%20can%20see%20in%20the%20image%20below%3C%2FLI%3E%0A%3CLI%3EManually%20avoid%20unnecessary%20processing.%20While%20Azure%20Search%20knows%20which%20files%20were%20added%20to%20a%20blob%20to%20avoid%20unnecessary%20processing%2C%20you%20will%20need%20to%20do%20it%20manually.%20Use%20any%20kind%20of%20control%20you%20want%2C%20like%20to%20move%20files%20from%20%E2%80%9Cpending%E2%80%9D%20to%20%E2%80%9Cprocessed%E2%80%9D%20containers.%20That%20means%20that%20your%20real%20url%20location%20should%20be%20a%20link%20to%20the%20%E2%80%9Cprocessed%E2%80%9D%20folder.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F125103iFC984947BD8DD475%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3EFigure%203%3A%20The%20body%20definition%20of%20your%20document%20update%20API%20call.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EThird%2C%20%3C%2FSTRONG%3Erelated%20to%20the%20user%20interface%2C%20is%20simple.%20Change%20an%20%E2%80%9CIF%E2%80%9D%20in%20your%20interface%3A%20when%20the%20%3CSTRONG%3E%3CEM%3EaudioFileUrlLocation%20%3C%2FEM%3E%3C%2FSTRONG%3Efile%20is%20not%20null%2C%20use%20it%20for%20user%20clicks%2C%20instead%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsearch%2Fsearch-howto-indexing-azure-blob-storage%23how-azure-search-indexes-blobs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Emetadata_storage_file_path%3C%2FA%3Efield%2C%20that%20is%20automatically%20filled%20for%20all%20files%20in%20your%20dataset.%20This%20field%20has%20the%20physical%20location%20of%20the%20data%20and%20is%20returned%20to%20search%20applications%20for%20click-to-open%20experience.%20For%20our%20audio%20files%2C%20it%20will%20provide%20the%20location%20of%20the%20json%20transcriptions.%20That%20IF%20will%20allow%20your%20application%20to%20open%20the%20audio%20file%20location%20and%20start%20to%20play%20it%2C%20or%20at%20least%2C%20offer%20the%20option%20to%20automatically%20play%20it.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1566349888%22%20id%3D%22toc-hId--1566349888%22%3EConclusion%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20blog%20post%20shows%20you%20how%20pre-processing%20is%20powerful%20for%20knowledge%20mining%20scenarios.%20The%20same%20process%20done%20here%20for%20audio%20files%20can%20be%20used%2C%20along%20with%20the%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fmedia-services%2Fvideo-indexer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVideo%20Indexer%20API%3C%2FA%3E%2C%20for%20video%20files.%20You%20will%20be%20extending%20the%20impact%20and%20the%20use%20of%20the%20knowledge%20mining%20solution%20for%20new%20data%20types%20that%20the%20original%20product%20can%E2%80%99t%20yet%20handle.%20The%20same%20data%20enrichment%20is%20done%20for%20audios%20and%20videos%2C%20allowing%20a%20complete%20search%20experience%20for%20users.%20For%20industry%20specific%20vocabularies%2C%20you%20may%20want%20to%20use%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fblog%2Fnew-ways-to-train-custom-language-models-effortlessly%2F%3Futm_source%3Ddlvr.it%26amp%3Butm_medium%3Dtwitter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ecustom%20language%20models%3C%2FA%3E%2C%20making%20your%20transcription%20even%20more%20effective.%20Stay%20tuned%2C%20%3CA%20href%3D%22http%3A%2F%2Faka.ms%2FACE-Blog%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20blog%20channel%3C%2FA%3Ehas%20a%20long%20list%20of%20AI%20solutions%20to%20be%20published.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-781957%22%20slang%3D%22en-US%22%3E%3CP%3ENew%20ACE%20Team%20blog%20post%20-%20Learn%20how%20to%20create%20Cognitive%20Search%20Solutions%20for%20audio%20data.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-781957%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzureAI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECognitive%20Services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EE2E%20Solutions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EKnowledge%20Mining%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Knowledge Mining is a technique to extract insights from structured and unstructured data. In this context, Azure Search is the standard Microsoft Knowledge Mining service, that uses AI to create metadata about images, relational databases, and textual data, providing a web-like search experience. Audio is a data type that matters for companies in all industries, containing customer and business information.  In this article you will learn how to combine these two separated worlds into one single search solution.

 

The challenge with audio data mining

 

We can turn Azure Search into Azure Cognitive Search, by adding an enrichment pipeline that creates meta data on images and text files. It pushes the created metadata into a Search Index, that contains pointers to the original data on its physical location on Azure. The supported data types are Microsoft Office documents, PDFs, json, xml, and image formats like png, jpg, and more. Those images may have a scene that will be tagged and described, or text that will be extracted. The text in the images may also be handwritten, like a form or meeting notes, common situations in every business.

 

But audio data isn’t supported, and a company may want to search also for the content from podcasts, meetings recordings, call center phone calls, and so on. A possible solution would be a custom skill. After the regular Cognitive Search pipeline for your standard supported documents, a second skillset is necessary. It would only extract physical metadata from the file and the custom skill would do the job. But today, August 2019, this approach has limitations on processing time, files sizes, and more. It will be addressed in a future blog post.

 

Another possible solution for this challenge has two steps, pre-processing and a link-through, that will allow users not only to search from company’s recordings but also to have the “click-to-open” experience, like Microsoft’s JFK or Azure Search Accelerator demos. Let’s see the details below. The diagram below shows you how it will work.

clipboard_image_0.png

Figure 1: The traditional Cognitive Search diagram, with the addition, in grey, of the required audio files pre-processing step

 

First Step - Pre-processing to extract textual data from the audio

 

In this first step, we need to extract textual data from the audio files before the Azure Cognitive Search enrichment pipeline. The process will feed the pipeline with json data containing the transcription of the audio files, a content that must be merged with the other files content, which happens just before the pipeline AI analysis like entity or key phrases extractions.

 

This idea is also seen within the speech support in a Bot,  with the help of the Microsoft Speech SDK. It will convert the audio to text, and then you can integrate your bot with other Azure Cognitive Services, like LUIS for language understanding, Text Analytics for information extraction, or Q&A Maker for knowledge base; all cognitive services are REST APIs that expect a textual input.

 

To implement this pre-processing, we will use the Microsoft Speech to Text API, a cognitive service that will do the transformation we need to mine knowledge from business audio. This API offers a range of capabilities you can embed into your apps to support various transcription scenarios, including conversation transcription, speech transcription, and custom speech transcription. The audio files location is informed as a parameter of the API call, and the service will access the file.

 

The code below allows you to submit your audio files to the API and get back the transcriptions in json files which has the name of the original recording file. This is key to allow the application to offer the “click-to-open” experience, what you will see in the next step of the solution for this challenge. To access to this code and sample files, click here for a GitHub lab that has all details necessary to accomplish this task.

 

clipboard_image_0.png

Figure 2: The script code to call the REST API for your audio files and get the transcription back.

 

For enterprise scenarios, it is necessary to use Batch Transcription, ideal for call centers, which typically accumulate thousands of hours of audio. It makes it easy to transcribe large volumes of audio recordings. By using the dedicated REST API, you can point to audio files with a shared access signature (SAS) URI and asynchronously receive transcriptions. It requires the S0 (Standard) tier of the Speech Service and will allow you to process file types like wav and mp3, without data volume limitations.

 

The Cognitive Services team did a great blog post on how to use the Text Analytics API on call center recordings. They used a similar architecture, with focus on Power BI dashboards for sentiment analysis and key phrases, instead of Cognitive Search. An interesting approach is to leverage both designs to create the best solution for your needs.

 

Second Step – Link-through for a “click-to-open” experience

 

Now you have the transcriptions, if you upload the json data to the same location of the rest of your dataset, it will be submitted for all AI processes you defined for your dataset. And the created metadata will be available for search in an inverted index, the theory behind Azure Search incredible performance. But the enrichment pipeline will index the json file, not the original audio. That means, in a click-to-open solution, the user will read the json file text instead of listening to the original recording. Here are the required actions to fix it:

 

  • First, create an azure search index with a field exclusive for the audio files URL location. This action can be done together with the previous step, when you do the index creation, or after the first execution of the pipeline, once, using the update index This field will only be filled for audio files and it is a good idea to use a name that suggests this, like “audioFileUrlLocation”. This file will be null for all non-audio files in your dataset. Tip: It is useful to have the audio files in the same storage account that you are using for the other documents, because your application won’t need to deal with another string connection.

 

  • Second, populate this field, which can be done with another script. With the document update method, you can update the field mentioned above with the real location of the audio files. That’s why the original file name within the json file name is so important. It will help the link-through process connect the index information to the correct audio data source location. Your script will:

 

  1. Do an Azure Search query to get the audio transcriptions keys, required to update only one document in the index. It is required to retrieve the id and the metadata_storage_name.
  2. For each audio document, find its key parsing the metadata_storage_name, simply removing the “.json” extensions
  3. Submit a “merge” for each audio document, with a body definition that you can see in the image below
  4. Manually avoid unnecessary processing. While Azure Search knows which files were added to a blob to avoid unnecessary processing, you will need to do it manually. Use any kind of control you want, like to move files from “pending” to “processed” containers. That means that your real url location should be a link to the “processed” folder.

clipboard_image_1.png

Figure 3: The body definition of your document update API call.

 

  • Third, related to the user interface, is simple. Change an “IF” in your interface: when the audioFileUrlLocation file is not null, use it for user clicks, instead of the metadata_storage_file_path field, that is automatically filled for all files in your dataset. This field has the physical location of the data and is returned to search applications for click-to-open experience. For our audio files, it will provide the location of the json transcriptions. That IF will allow your application to open the audio file location and start to play it, or at least, offer the option to automatically play it.

 

Conclusion

 

This blog post shows you how pre-processing is powerful for knowledge mining scenarios. The same process done here for audio files can be used, along with the Video Indexer API, for video files. You will be extending the impact and the use of the knowledge mining solution for new data types that the original product can’t yet handle. The same data enrichment is done for audios and videos, allowing a complete search experience for users. For industry specific vocabularies, you may want to use custom language models, making your transcription even more effective. Stay tuned, this blog channel has a long list of AI solutions to be published.