diff --git a/.dockerignore b/.dockerignore deleted file mode 100755 index 27d2dae..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -*/node_modules -*.log diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7a1840b..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store - -node_modules - -lib/core/metadata.js -lib/core/MetadataBlog.js - -website/translated_docs -website/build/ -website/yarn.lock -website/node_modules -website/.firebase -website/i18n/* diff --git a/Dockerfile b/Dockerfile deleted file mode 100755 index fbd5700..0000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:8.11.4 - -WORKDIR /app/website - -EXPOSE 3000 35729 9005 -COPY ./docs /app/docs -COPY ./website /app/website -RUN yarn install -RUN npm install -g docusaurus firebase-tools firebase-admin - -CMD ["yarn", "start"] diff --git a/README.md b/README.md deleted file mode 100644 index ad8b73d..0000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# developer-docs - -API documentation for DeepAffects Developer Portal. - -## Steps to deploy - -1. Update documentation inside `docs` folder -2. `cd website` -3. `yarn build` -4. `firebase use default` -5. `firebase deploy` diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..21b4c3f --- /dev/null +++ b/css/main.css @@ -0,0 +1 @@ +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}body{color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;word-wrap:break-word}*{box-sizing:border-box}strong{font-weight:600}[type=checkbox]{box-sizing:border-box;padding:0}a,a:hover{color:#2e2e2e;text-decoration:none}a:active,a:hover{outline-width:0}a:not([href]){color:inherit;text-decoration:none}p{margin-bottom:1em;margin-top:0}h1,h2,h3,h4,h5,h6{color:inherit;font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:1.5em}h1{font-size:32px}h2{font-size:24px}h3{font-size:20px}h4{font-size:16px}h5{font-size:14px}h6{font-size:13.6px}ol,ul{margin-bottom:1em;margin-top:0;padding-left:2em}ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin-bottom:0;margin-top:0}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}li{word-wrap:break-all}li>p{margin-top:1em}li+li{margin-top:.25em}img{border-style:none;box-sizing:content-box;max-width:100%}img[align=right]{padding-left:1.25em}img[align=left]{padding-right:1.25em}table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:16px;margin-top:0;overflow:auto;width:100%}table tr{background-color:transparent;border-top:1px solid #dfe2e5}table tr:nth-child(2n){background-color:#f6f8fa}table td,table th{border:1px solid #dfe2e5;padding:6px 13px}table th{background-color:inherit;font-weight:600}table td,table th{color:inherit}blockquote{color:#6a737d;font-size:16px;margin:0;margin-bottom:16px;padding:0 1em}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}code{background-color:rgba(27,31,35,.05);border-radius:3px;color:inherit;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:85%;margin:0;padding:3.2px 6.4px}pre{margin-bottom:16px}pre code{background-color:transparent;border:0;display:inline;font-size:85%;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0;white-space:pre;word-break:normal;word-wrap:normal}kbd{background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;display:inline-block;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:68.75%;line-height:10px;padding:3px 5px;vertical-align:middle}hr{border:1px solid #dfe2e5;box-sizing:content-box;margin:1.5em 0;overflow:hidden;padding:0}hr:after,hr:before{content:"";display:table}hr:after{clear:both}body{min-height:100vh;text-rendering:optimizeLegibility}@media only screen and (min-width:736px){body{display:flex;flex-direction:column}}article:after,article:before{content:"";display:table}article:after{clear:both}article>:first-child{margin-top:0}article>:last-child{margin-bottom:0}article iframe,article p img{display:block;margin-left:auto;margin-right:auto;max-width:100%}.anchor{display:block;position:relative;top:-80px}.hash-link{line-height:1;margin-left:-20px;opacity:0;padding-right:4px;transition:opacity .3s}.hash-link:hover{opacity:1!important;transition:none}.hash-link .hash-link-icon{vertical-align:middle}.button{border:1px solid #2e2e2e;border-radius:3px;color:#2e2e2e;display:inline-block;font-size:14px;font-weight:400;line-height:1.2em;padding:10px;text-decoration:none!important;text-transform:uppercase;transition:background .3s,color .3s}.button:hover{background:#2e2e2e;color:#fff}h1:hover .hash-link,h2:hover .hash-link,h3:hover .hash-link,h4:hover .hash-link{opacity:.5;transition:none}blockquote{background-color:rgba(255,229,100,.3);border-left:8px solid #ffe564;padding:15px 30px 15px 15px}.wrapper{margin:0 auto;max-width:1100px;padding:0 20px}.wrapper blockquote>p:first-child{padding-top:0}.center{display:block}.center,.homeContainer{text-align:center}.homeContainer .homeWrapper{padding:2em 10px}.homeContainer .homeWrapper .wrapper{margin:0 auto;max-width:900px;padding:0 20px}.homeContainer .homeWrapper .projectLogo img{height:100px;margin-bottom:0}.homeContainer .homeWrapper #project_title{font-size:300%;letter-spacing:-.08em;line-height:1em;margin-bottom:80px}.homeContainer .homeWrapper #project_tagline{font-size:200%;letter-spacing:-.04em;line-height:1em}.projectLogo{display:none;pointer-events:none}.projectLogo img{height:100px;margin-bottom:0}.projectIntro{margin:40px 0}.projectTitle{color:#2e2e2e;font-size:250%;line-height:1em}.projectTitle>small{display:block;font-weight:400;font-size:50%;line-height:1em;margin:.7em 0 1.3em}@media only screen and (min-width:480px){.projectTitle{font-size:300%;margin:.3em 0}.projectLogo img{height:200px;margin-bottom:10px}.homeContainer .homeWrapper{padding-left:10px;padding-right:10px}}@media only screen and (min-width:736px){.homeContainer .homeWrapper{position:relative}.homeContainer .homeWrapper #inner{max-width:600px;padding-right:40px}}@media only screen and (min-width:1200px){.homeContainer .homeWrapper #inner{max-width:750px}.homeContainer .homeWrapper .projectLogo{align-items:center;bottom:0;display:flex;justify-content:flex-end;left:0;padding:2em 100px 4em;position:absolute;right:0;top:0}.homeContainer .homeWrapper .projectLogo img{height:100%;max-height:250px}}@media only screen and (min-width:1500px){.homeContainer .homeWrapper #inner{max-width:1100px;padding-bottom:40px;padding-top:40px}.wrapper{max-width:1400px}}.mainContainer{flex:1 1 auto;max-width:100%;padding:48px 0}.mainContainer .wrapper{text-align:left}.mainContainer .wrapper .allShareBlock{padding:10px 0}.mainContainer .wrapper .allShareBlock .pluginBlock{margin:12px 0;padding:0}.mainContainer .wrapper .post{position:relative}.mainContainer .wrapper .post.basicPost{margin-top:30px}.mainContainer .wrapper .post .postHeader{margin-bottom:16px}.mainContainer .wrapper .post .postHeaderTitle{margin-top:0;padding:0}.mainContainer .wrapper .post .postSocialPlugins{padding-top:1em}.mainContainer .wrapper .post .docPagination{background:#2e2e2e;bottom:0;left:0;position:absolute;right:0}.mainContainer .wrapper .post .docPagination .pager{display:inline-block;width:50%}.mainContainer .wrapper .post .docPagination .pagingNext{float:right;text-align:right}.mainContainer .wrapper .post .docPagination a{border:none;color:#fff;display:block;padding:4px 12px}.mainContainer .wrapper .post .docPagination a:hover{background-color:#f9f9f9;color:#393939}.mainContainer .wrapper .post .docPagination a .pagerLabel{display:inline}.mainContainer .wrapper .post .docPagination a .pagerTitle{display:none}@media only screen and (min-width:480px){.mainContainer .wrapper .post .docPagination a .pagerLabel{display:none}.mainContainer .wrapper .post .docPagination a .pagerTitle{display:inline}}@media only screen and (min-width:1024px){.mainContainer .wrapper .post{display:block}.mainContainer .wrapper .posts .post{width:100%}}.fixedHeaderContainer{background:#2e2e2e;color:#fff;min-height:50px;padding:8px 0;position:fixed;width:100%;z-index:6}@media only screen and (min-width:1024px){.fixedHeaderContainer{flex-shrink:0}}.fixedHeaderContainer a{align-items:center;border:0;color:#fff;display:flex;flex-flow:row nowrap;height:34px;z-index:7}.fixedHeaderContainer header{display:flex;flex-flow:row nowrap;position:relative;text-align:left}.fixedHeaderContainer header img{height:100%;margin-right:10px}.fixedHeaderContainer header .headerTitle{font-size:1.25em;margin:0}.fixedHeaderContainer header .headerTitleWithLogo{display:block;font-size:1.25em;line-height:18px;margin:0;position:relative;z-index:6}.fixedHeaderContainer header h3{color:#fff;font-size:16px;margin:0;margin-left:10px;text-decoration:underline}@media (max-width:480px){.headerTitle{font-size:17px}.headerTitleWithLogo{display:none!important}}.promoSection{display:flex;flex-flow:column wrap;font-size:125%;line-height:1.6em;position:relative;z-index:3}.promoSection .promoRow{padding:10px 0}.promoSection .promoRow .pluginWrapper{display:block}.promoSection .promoRow .pluginWrapper.ghStarWrapper,.promoSection .promoRow .pluginWrapper.ghWatchWrapper{height:28px}.promoSection .promoRow .pluginRowBlock{display:flex;flex-wrap:wrap;justify-content:center;margin:0 -2px}.promoSection .promoRow .pluginRowBlock .pluginWrapper{padding:0 2px}.promoSection .promoRow .pluginRowBlock iframe{margin-left:2px;margin-top:5px}input[type=search]{-moz-appearance:none;-webkit-appearance:none}.navSearchWrapper{align-items:center;align-self:center;display:flex;justify-content:center;padding-left:10px;position:absolute;right:10px;top:15px}.navSearchWrapper:before{border:3px solid #e5e5e5;border-radius:50%;content:" ";display:block;height:6px;left:15px;position:absolute;top:50%;transform:translateY(-58%);width:6px;z-index:1}.navSearchWrapper:after{background:#e5e5e5;content:" ";height:7px;left:24px;position:absolute;top:55%;transform:rotate(-45deg);width:3px;z-index:1}.navSearchWrapper .aa-dropdown-menu{background:#f9f9f9;border:3px solid rgba(57,57,57,.25);color:#393939;font-size:14px;left:auto!important;line-height:1.2em;right:0!important}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--category-header{background:#2e2e2e;color:#fff;font-size:14px;font-weight:400}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background-color:#2e2e2e;color:#fff}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--subcategory-column .algolia-docsearch-suggestion--highlight,.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--title .algolia-docsearch-suggestion--highlight{color:#2e2e2e}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--subcategory-column,.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion__secondary{border-color:rgba(57,57,57,.3)}input#search_input_react{background-color:rgba(0,0,0,.2);border:none;border-radius:20px;color:#fff;font-size:14px;font-weight:300;line-height:20px;outline:none;padding-left:25px;position:relative;transition:width .5s ease;width:170px}input#search_input_react:active,input#search_input_react:focus{color:#fff;width:220px}@media only screen and (max-width:735px){.navSearchWrapper{width:40%}}input::placeholder{color:#e5e5e5}.hljs{padding:1.25rem 1.5rem}.gridBlock{padding:0}.gridBlock>*{box-sizing:border-box}.gridBlock .fourByGridBlock img,.gridBlock .threeByGridBlock img,.gridBlock .twoByGridBlock img{max-width:100%}.gridBlock .gridClear{clear:both}@media only screen and (max-width:735px){.gridBlock .fourByGridBlock{flex:1 0 26%}}@media only screen and (min-width:736px){.gridBlock{display:flex;flex-direction:row;flex-wrap:wrap}.gridBlock>*{margin:0 12px}.gridBlock>:first-child{margin-left:0}.gridBlock>:last-child{margin-right:0}.gridBlock .twoByGridBlock{flex:1 0 40%}.gridBlock .threeByGridBlock{flex:1 0 26%}.gridBlock .fourByGridBlock{flex:1 0 20%}h2+.gridBlock{padding-top:20px}}@media only screen and (min-width:1400px){.gridBlock{display:flex;flex-direction:row;flex-wrap:wrap}}.alignCenter{text-align:center}.alignRight{text-align:right}.imageAlignSide{display:flex;flex-flow:row wrap}.blockImage{max-width:730px}.imageAlignSide .blockImage{flex:0 1 500px;max-width:500px}@media only screen and (max-width:735px){.imageAlignSide .blockImage{display:none}}.imageAlignSide .blockContent{flex:1 1}.imageAlignBottom .blockImage{margin:0 auto 20px;max-width:730px}.imageAlignBottom.alignCenter .blockImage{margin-left:auto;margin-right:auto}.imageAlignTop .blockImage{margin-bottom:20px;max-width:80px}.imageAlignTop.alignCenter .blockImage{margin-left:auto;margin-right:auto}.imageAlignRight .blockImage{margin-left:40px}.imageAlignLeft .blockImage{margin-right:40px}.container .gridBlock .blockContent p{padding:0}.container .wrapper .alignCenter h2{text-align:center}.container .wrapper .imageAlignSide h2{text-align:left}.container .wrapper .imageAlignSide p{margin:0;margin-bottom:40px;max-width:560px}.highlightBackground{background:rgba(153,66,79,.7);color:#fff}.highlightBackground a{font-weight:800}.container.highlightBackground .wrapper h1,.container.highlightBackground .wrapper h2,.container.highlightBackground .wrapper h3,.container.highlightBackground .wrapper h4,.container.highlightBackground .wrapper h5,.highlightBackground a{border-color:#fff;color:#fff}.lightBackground{background:#f7f7f7}.darkBackground{background:gray;color:#fff}.darkBackground a,.darkBackground code{color:#d6b3b8}.container.darkBackground .wrapper h1,.container.darkBackground .wrapper h2,.container.darkBackground .wrapper h3,.container.darkBackground .wrapper h4,.container.darkBackground .wrapper h5{border-color:#fff;color:#fff}.container.paddingAll{padding:40px}.container.paddingBottom{padding-bottom:80px}.container.paddingLeft{padding-left:40px}.container.paddingRight{padding-right:40px}.container.paddingTop{padding-top:80px}@media only screen and (max-width:735px){.container.paddingBottom{padding-bottom:40px}.container.paddingTop{padding-top:20px}}@media only screen and (max-width:1023px){.responsiveList .blockContent{position:relative}.responsiveList .blockContent>div{padding-left:20px}.responsiveList .blockContent:before{content:"\2022";position:absolute}}.navigationSlider .navSlideout{cursor:pointer;padding-top:4px;position:absolute;right:10px;top:0;transition:top .3s;z-index:5}.navigationSlider .slidingNav{bottom:auto;box-sizing:border-box;left:0;position:fixed;right:0;top:0}.navigationSlider .slidingNav.slidingNavActive{height:auto;padding-top:42px;width:300px}.navigationSlider .slidingNav ul{background:#205c3b;box-sizing:border-box;color:#fff;display:flex;flex-wrap:nowrap;list-style:none;margin-top:50px;padding:0;width:100%}.navigationSlider .slidingNav.slidingNavActive ul{display:block}.navigationSlider .slidingNav ul li{flex:1 1 auto;margin:0;text-align:center;white-space:nowrap}.navigationSlider .slidingNav ul li a{align-items:center;box-sizing:border-box;color:#2e2e2e;color:inherit;display:flex;font-size:.9em;height:auto;height:50px;justify-content:center;margin:0;padding:10px;transition:background-color .3s}.navigationSlider .slidingNav ul li.siteNavGroupActive a,.navigationSlider .slidingNav ul li.siteNavItemActive a,.navigationSlider .slidingNav ul li a:focus,.navigationSlider .slidingNav ul li a:hover{background:#2e2e2e}.languages-icon{width:20px}#languages-dropdown{pointer-events:none;position:absolute;width:100%}#languages-dropdown.visible{display:flex}#languages-dropdown.hide{display:none}#languages-dropdown-items{background-color:#2e2e2e;display:flex;flex-direction:column;min-width:120px;pointer-events:all}#languages li{display:block}.navPusher{left:0;min-height:100%;padding-top:100px;position:relative;z-index:3}.navPusher:after{background:rgba(0,0,0,.4);content:"";height:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .5s,width .1s .5s,height .1s .5s;width:0}@media screen and (min-width:1024px){.navPusher{display:flex;flex-direction:column;min-height:calc(100vh - 50px);padding-top:50px}.navPusher,.navPusher>:first-child{flex-grow:1}}.sliderActive .navPusher:after{height:100%;opacity:1;transition:opacity .5s;width:100%;z-index:4}@media only screen and (max-width:1024px){.reactNavSearchWrapper input#search_input_react{background-color:hsla(17,71%,82%,.25);border:none;border-radius:20px;box-sizing:border-box;color:#393939;font-size:14px;line-height:20px;outline:none;padding-left:25px;position:relative;transition:background-color .2s cubic-bezier(.68,-.55,.265,1.55),width .2s cubic-bezier(.68,-.55,.265,1.55),color .2s ease;width:100%}.reactNavSearchWrapper input#search_input_react:active,.reactNavSearchWrapper input#search_input_react:focus{background-color:#2e2e2e;color:#fff}.reactNavSearchWrapper .algolia-docsearch-suggestion--subcategory-inline{display:none}.reactNavSearchWrapper>span{width:100%}.reactNavSearchWrapper .aa-dropdown-menu{background:#f9f9f9;border:0 solid #f9f9f9;border-radius:0;color:#393939;font-size:12px;line-height:2em;max-height:140px;min-width:auto;-webkit-overflow-scrolling:touch;overflow-y:scroll;padding:0;position:relative!important;width:100%}#languages-dropdown{left:0;top:50px}#languages-dropdown-items{background-color:#2e2e2e;display:flex;flex-direction:row}}@media only screen and (min-width:1024px){.navSearchWrapper{padding-left:10px;position:relative;right:auto;top:auto}.navSearchWrapper .algolia-autocomplete{display:block}.navigationSlider{height:34px;margin-left:auto;position:relative}.navigationSlider .navSlideout{display:none}.navigationSlider nav.slidingNav{background:none;height:auto;position:relative;right:auto;top:auto;width:auto}.navigationSlider .slidingNav ul{background:none;display:flex;flex-flow:row nowrap;margin:0;padding:0;width:auto}.navigationSlider .slidingNav ul li a{border:0;color:hsla(0,0%,100%,.8);display:flex;font-size:16px;font-size:1em;font-weight:300;height:32px;line-height:1.2em;margin:0;padding:0;padding:6px 10px}.navigationSlider .slidingNav ul li.siteNavGroupActive a,.navigationSlider .slidingNav ul li.siteNavItemActive a,.navigationSlider .slidingNav ul li a:hover{color:#fff}}@media only screen and (max-width:735px){.navigationSlider .slidingNav ul{overflow-x:auto}.navigationSlider .slidingNav ul::-webkit-scrollbar{display:none}}.docMainWrapper .wrapper{padding-left:0;padding-right:0;padding-top:10px}@media only screen and (min-width:1024px){.docMainWrapper{width:100%}.docMainWrapper>*{margin:0 24px}.docMainWrapper>:first-child{margin-left:0}.docMainWrapper>:last-child{margin-right:0}.docMainWrapper .mainContainer{min-width:0}}.edit-page-link{float:right;font-size:10px;font-weight:400;margin-top:3px;text-decoration:none}@media only screen and (max-width:1023px){.edit-page-link{display:none}}.docs-prevnext{margin:20px 0}.docs-prevnext:after{clear:both;content:" ";display:table}.docs-next{float:right}.docs-prev{float:left}@media only screen and (max-width:735px){.docs-prevnext{height:40px}}@media only screen and (max-width:1023px){.docsNavContainer{background:#fff;left:0;position:fixed;width:100%;z-index:4}}@media only screen and (min-width:1024px){.docsNavContainer{flex:0 0 240px;height:calc(100vh - 50px);position:-webkit-sticky;position:sticky;overflow-y:auto;top:50px}}.docsSliderActive.docsNavContainer{box-sizing:border-box;height:100%;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior:contain;padding-bottom:50px}.docsNavContainer .toc .navBreadcrumb{background-color:#f1f1f1;box-sizing:border-box;display:flex;flex-flow:row nowrap;font-size:12px;height:48px;overflow:hidden;padding:8px 20px}.docsNavContainer .toc .navWrapper{padding:0}@media only screen and (min-width:1024px){.docsNavContainer .toc .navBreadcrumb{display:none}.navBreadcrumb h2{padding:0 10px}.separateOnPageNav .docsNavContainer{flex:0 0 240px}}.navBreadcrumb a,.navBreadcrumb span{border:0;color:#393939}@media only screen and (max-width:735px){.anchor{top:-144px}}@media only screen and (min-width:1024px){.toc{padding:40px 0}}.toc section{padding:0;position:relative}.toc section .navGroups{display:none;padding:48px 20px 60px}.toc .toggleNav{color:#393939;position:relative}.toc .toggleNav .navToggle{cursor:pointer;height:32px;margin-right:10px;position:relative;text-align:left;width:18px}.toc .toggleNav .navToggle:after,.toc .toggleNav .navToggle:before{border:5px solid #393939;border-width:5px 0;content:"";height:6px;left:0;left:8px;margin-top:-8px;position:absolute;top:50%;transform:rotate(45deg);width:3px;z-index:1}.toc .toggleNav .navToggle:after{transform:rotate(-45deg)}.toc .toggleNav .navToggle i:after,.toc .toggleNav .navToggle i:before{background:transparent;border-color:transparent #393939;border-style:solid;border-width:0 5px 5px;content:"";height:0;left:2px;margin-top:-7px;opacity:1;position:absolute;top:50%;width:5px;z-index:2}.toggleNav h2 i{padding:0 4px}.toc .toggleNav .navToggle i:after{border-width:5px 5px 0;margin-top:2px}.docsSliderActive .toc .toggleNav .navToggle:after,.docsSliderActive .toc .toggleNav .navToggle:before{border-width:8px 0;height:0;margin-top:-8px}.docsSliderActive .toc .toggleNav .navToggle i{opacity:0}.docsSliderActive .tocToggler{visibility:hidden}.toc .toggleNav .navGroup{margin-bottom:16px}.toc .toggleNav .navGroup .navGroupCategoryTitle{color:#393939;font-size:18px;font-weight:500;line-height:1.2em;margin-bottom:8px;margin-top:0}.toc .toggleNav .navGroup .navListItem{margin:0}.toc .toggleNav .navGroup h3 i:not(:empty){box-sizing:border-box;color:rgba(57,57,57,.5);display:inline-block;height:16px;margin-right:10px;text-align:center;transition:color .2s;width:16px}.toc .toggleNav ul{padding:0 8px}.docsSliderActive .toc .toggleNav ul{padding-left:0}.toc .toggleNav ul li{list-style-type:none;padding:0}.toc .toggleNav ul li a{border:none;color:#717171;display:block;font-size:14px;padding:4px 0;transition:color .3s}.toc .toggleNav ul li.navListItemActive a,.toc .toggleNav ul li a:focus,.toc .toggleNav ul li a:hover{color:#2e2e2e}.docsSliderActive .toc .navBreadcrumb,.tocActive .navBreadcrumb{border-bottom:1px solid #ccc;margin-bottom:20px;position:fixed;width:100%}.toc .toggleNav .navBreadcrumb h2{border:0;flex-grow:1;font-size:16px;font-weight:600;line-height:32px;margin:0;padding:0}.docsSliderActive .toc section .navGroups{display:block;padding-top:60px}.tocToggler{cursor:pointer;height:32px;line-height:32px;margin-right:-10px;padding:0 10px}.icon-toc{box-sizing:border-box;display:inline-block;line-height:normal;position:relative;top:-1px;vertical-align:middle}.icon-toc,.icon-toc:after,.icon-toc:before{background-color:currentColor;border:1px solid currentColor;border-radius:50%;box-sizing:border-box;height:4px;width:4px}.icon-toc:after,.icon-toc:before{content:"";position:absolute}.icon-toc:before{left:-1px;top:-7px}.icon-toc:after{left:-1px;top:5px}.tocActive .icon-toc{border-radius:0;height:16px;transform:rotate(45deg);width:3px}.tocActive .icon-toc:before{border-radius:0;height:3px;left:50%;top:50%;transform:translate(-50%,-50%);width:16px}.tocActive .icon-toc:after{content:""}@media only screen and (min-width:1024px){.docMainWrapper{display:flex;flex-flow:row nowrap}.docMainWrapper .wrapper{padding-top:0;padding-left:0;padding-right:0}}.onPageNav{display:none}.onPageNav::-webkit-scrollbar{display:none}.onPageNav a{color:#717171}.onPageNav ul{list-style:none}.onPageNav ul li{font-size:12px;line-height:16px;padding-bottom:8px}.onPageNav ul ul{padding:8px 0 0 20px}.onPageNav ul ul li{padding-bottom:5px}@media only screen and (min-width:1024px){.toc section .navGroups{display:block;padding:0;padding-top:8px}.navBreadcrumb h2{padding:0 10px}}@supports ((position:-webkit-sticky) or (position:sticky)){@media only screen and (max-width:1023px){.tocActive .onPageNav{background:#fff;bottom:0;display:block;left:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px;position:fixed;right:0;top:148px;z-index:2}.tocActive .navBreadcrumb h2,.tocActive .navToggle{visibility:hidden}.tocActive .onPageNav>.toc-headings{padding:12px 0}}@media only screen and (min-width:1024px){.separateOnPageNav .headerWrapper.wrapper,.separateOnPageNav .wrapper{max-width:1400px}.separateOnPageNav .toc{width:auto}.separateOnPageNav.sideNavVisible .navPusher .mainContainer{flex:1 auto;max-width:100%;min-width:0}.onPageNav{align-self:flex-start;display:block;flex:0 0 240px;max-height:calc(100vh - 90px);overflow-y:auto;position:-webkit-sticky;position:sticky;top:90px}.onPageNav>.toc-headings{border-left:1px solid #e0e0e0;padding:10px 0 2px 15px}.tocToggler{display:none}}}.blog .wrapper{max-width:1100px}.blogContainer .posts .post{border-bottom:1px solid #e0e0e0;border-radius:3px;margin-bottom:20px;padding-bottom:20px}.blogContainer .postHeader{margin-bottom:10px}.blogContainer .postHeaderTitle{margin-top:0}.blogContainer .postHeader p.post-meta{margin-bottom:10px;padding:0}.blogContainer .postHeader .authorBlock{display:flex}.blogContainer .postHeader .post-authorName{color:rgba(57,57,57,.7);display:flex;flex-direction:column;font-size:14px;font-weight:400;justify-content:center;margin-right:10px;margin-top:0;padding:0}.blogContainer .postHeader .authorPhoto{border-radius:50%;height:30px;overflow:hidden;width:30px}.blogContainer .postHeader .authorPhoto.authorPhotoBig{height:50px;width:50px}.blog-recent{margin:20px 0}.blog-recent>a{float:left}@media only screen and (max-width:735px){.blog-recent{height:40px}}.blogSocialSection{display:block;padding:36px 0}.blogSocialSection .blogSocialSectionItem{padding-bottom:5px}.fb-like{display:block;margin-bottom:20px;width:100%}.more-users{margin:0 auto;max-width:560px;text-align:center}.productShowcaseSection{padding:0 20px;text-align:center}.productShowcaseSection.paddingTop{padding-top:20px}.productShowcaseSection.paddingBottom{padding-bottom:80px}.productShowcaseSection h2{color:#2e2e2e;font-size:30px;line-height:1em;margin-top:20px;padding:10px 0;text-align:center}.productShowcaseSection p{margin:0 auto;max-width:560px;padding:.8em 0}.productShowcaseSection .logos{align-items:center;display:flex;flex-flow:row wrap;justify-content:center;padding:20px}.productShowcaseSection .logos img{max-height:110px;padding:20px;width:110px}@media only screen and (max-width:735px){.productShowcaseSection .logos img{max-height:64px;padding:20px;width:64px}}.showcaseSection{margin:0 auto;max-width:900px}.showcaseSection,.showcaseSection .prose h1{text-align:center}.showcaseSection .prose{margin:0 auto;max-width:560px;text-align:center}.showcaseSection .logos{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.showcaseSection .logos img{max-height:128px;padding:20px;width:128px}@media only screen and (max-width:735px){.showcaseSection .logos img{max-height:64px;padding:20px;width:64px}}.nav-footer{background:#20232a;border:none;color:#202020;font-size:15px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:24px;padding-bottom:2em;padding-top:2em;position:relative}@media only screen and (min-width:1024px){.nav-footer{flex-shrink:0}}.nav-footer .sitemap{display:flex;justify-content:space-between;margin:0 auto 3em;max-width:1080px}.nav-footer .sitemap div{flex:1}.nav-footer .sitemap .nav-home{display:table;height:72px;margin:-12px 20px 0 0;opacity:.4;padding:10px;transition:opacity .15s ease-in-out;width:72px}.nav-footer .sitemap .nav-home:focus,.nav-footer .sitemap .nav-home:hover{opacity:1}@media only screen and (max-width:735px){.nav-footer .sitemap{display:flex;flex-direction:column;margin:0 2em 3em;width:calc(100% - 4em)}.nav-footer .sitemap>div{margin-bottom:18px}}.nav-footer .sitemap a{color:hsla(0,0%,100%,.6);display:block;margin:2px -10px;padding:3px 10px}.nav-footer .sitemap a:focus,.nav-footer .sitemap a:hover,.nav-footer .sitemap h5>a:focus,.nav-footer .sitemap h5>a:hover{color:#fff;text-decoration:none}.nav-footer .sitemap h5,.nav-footer .sitemap h6{margin:0 0 10px}.nav-footer .sitemap h5,.nav-footer .sitemap h5>a,.nav-footer .sitemap h6,.nav-footer .sitemap h6>a{color:#fff}.nav-footer .sitemap h5>a,.nav-footer .sitemap h6>a{margin:0 -10px}.nav-footer .fbOpenSource{display:block;margin:1em auto;opacity:.4;transition:opacity .15s ease-in-out;width:170px}.nav-footer .fbOpenSource:hover{opacity:1}.nav-footer .copyright{color:hsla(0,0%,100%,.4);text-align:center}.nav-footer .social{padding:5px 0}h3+ol a,p a{text-decoration:underline} \ No newline at end of file diff --git a/css/prism.css b/css/prism.css new file mode 100644 index 0000000..3a997e0 --- /dev/null +++ b/css/prism.css @@ -0,0 +1,130 @@ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ + +code[class*="language-"], +pre[class*="language-"] { + color: black; + background: none; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { + text-shadow: none; +} + +pre[class*="language-"]::selection, pre[class*="language-"] ::selection, +code[class*="language-"]::selection, code[class*="language-"] ::selection { + text-shadow: none; +} + +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.number, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function, +.token.class-name { + color: #DD4A68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100755 index ae57682..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: "3" - -services: - docusaurus: - build: . - ports: - - 3000:3000 - - 35729:35729 - - 9005:9005 - volumes: - - ./docs:/app/docs - - ./website/blog:/app/website/blog - - ./website/core:/app/website/core - - ./website/i18n:/app/website/i18n - - ./website/pages:/app/website/pages - - ./website/static:/app/website/static - - ./website/sidebars.json:/app/website/sidebars.json - - ./website/siteConfig.js:/app/website/siteConfig.js - working_dir: /app/website diff --git a/docs/asr-api.md b/docs/asr-api.md deleted file mode 100644 index 1274995..0000000 --- a/docs/asr-api.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -id: speech-to-text-api -title: Speech-to-Text API -sidebar_label: Automatic Speech Recognition API ---- - -Automatic Speech Recognition API provides high-quality speech-to-text conversion powered by machine learning. The api also supports speaker diarization and smart punctuation to further enhance the utility of the transcribed output. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/async/asr` - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/async/asr?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json with content -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", "audioType": "callcenter", "enableSpeakerDiarization": true} - -# contents of data.json with url -{"url": "https://publicly-facing-url.flac", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", "audioType": "callcenter", "enableSpeakerDiarization": true} -``` - - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v1/async/asr', - qs: - { apikey: '', - webhook: ''}, - headers: - { 'Content-Type': 'application/json' }, - body: - { encoding: 'FLAC', - languageCode: 'en-US', - url: 'https://publicly-facing-url.flac', - sampleRate: 8000, - enableSpeakerDiarization: true, - enablePunctuation: true, - audioType: "callcenter" }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/audio/generic/api/v1/async/asr" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "FLAC", - "languageCode": "en-US", - "sampleRate": 8000 - "audioType": "callcenter", - "enableSpeakerDiarization": true, - "enablePunctuation": true -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.flac" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - -### Output - - - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": { - "num_speakers": 2, - "confidence": 0.97, - "words":[ - { - "speaker_id": "1", - "start": 0, - "end": 1, - "word": "Hi", - "confidence": 0.97 - }, - { - "speaker_id": "2", - "start": 1.2, - "end": 2, - "word": "Hello", - "confidence": 0.97 - }, - { - "speaker_id": "2", - "start": 2, - "end": 2.6, - "word": "this", - "confidence": 0.97 - }, - { - "speaker_id": "2", - "start": 2.6, - "end": 3, - "word": "is", - "confidence": 0.97 - }, - { - "speaker_id": "2", - "start": 3, - "end": 4, - "word": "Susan", - "confidence": 0.97 - } - ], - "transcript": "Hi! Hello, this is Susan." - } -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | -| audioType | String | Type of the audio based on number of speakers. | Optional. [default to callcenter]. Permitted values: `callcenter`, `meeting`, `earnings_calls`, `interview`, `press_conference`. | -| source | String | The source for the audio file: webex, zoom, gotomeeting, phone. | Optional. The value will be used if `enableSpeakerDiarization` is set to `True`. | -| speakerCount | Number | Number of speakers in the file (-1 for unknown speakers). | Optional. [default to -1]. The value will be used if `enableSpeakerDiarization` is set to `True`. | -| speakerIds | List[String] | Optional set of speakers to be identified. | Optional. [default to []]. The value will be used if `enableSpeakerDiarization` is set to `True`. | -| doVad | Bool | Apply voice activity detection. | Optional. [default to `False`]. The value will be used if `enableSpeakerDiarization` is set to `True`. | -| enablePunctuation | Boolean | Enables DeepAffects [Smart Punctuation API](text-punctuation-api.md). | Optional. [default to `True`] | -| enableSpeakerDiarization | Boolean | Tags each word corresponding to the speaker. | Optional. [default to `False`] | -| separateSpeakerPerChannel | Boolean | Set to `True` if the input audio is multi-channel and each channel has a separate speaker. | Optional. [default to `False`] The value will be used if `enableSpeakerDiarization` is set to `True`. | - -> **NOTES:** -> * We recommend using callcenter when there are 2-3 speakers expected to be identified and meeting when 4-6 speakers are expected. -> * Exactly one of url and content should be passed. In case both values are passed, error is thrown. -> * doVad: This parameters is required if you want silence & noise segments removed from the diarization output. We suggest you to set it to True. -> * source: Adding source information enables an enhanced model which is built specifically for those audio sources. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | The actual output of the transcription. | The Transcribed object is defined below. | - -#### Transcribed Object - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------- | ------------------------------------------------------------------------------- | -| num_speakers | Number | The number of speakers detected. | Field is set only when `enableSpeakerDiarization` is `true`. | -| words | List | List of word segments. | The Word Segment is defined below. | -| transcript | String | The entire transcript with/without punctuations according to the input. | | -| confidence | Number | Overall transcription confidence. | | - - -#### Word Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------------------- | ----- | -| speaker_id | String | The speaker id for the corresponding audio segment. | Field is set only when `enableSpeakerDiarization` is `true`. | -| start | Number | Start time of the audio segment in seconds. | | -| end | Number | End time of the audio segment in seconds. | | -| word | String | The word corresponding to the audio segment. | | -| confidence | Number | Confidence score for the word. | | diff --git a/docs/audio-denoising-api.html b/docs/audio-denoising-api.html new file mode 100644 index 0000000..c508e9d --- /dev/null +++ b/docs/audio-denoising-api.html @@ -0,0 +1,181 @@ +Audio Denoising Api · DeepAffects \ No newline at end of file diff --git a/docs/audio-denoising-api.md b/docs/audio-denoising-api.md deleted file mode 100644 index ce2cc9a..0000000 --- a/docs/audio-denoising-api.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -id: audio-denoising-api -title: Audio Denoising API -sidebar_label: Audio Denoising API ---- - -Audio denoising api removes noise from your audio signals and returns the denoised audio clip. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/async/denoise` - -### Sample Code - - - -```shell - -# async request -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/async/denoise?apikey=>&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/audio/generic/api/v2/async/denoise" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "Wave", - "languageCode": "en-US", - "sampleRate": 8000 -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.wav" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v2/async/denoise', - qs: - { apikey: '', - webhook: ''}, - headers: - { 'Content-Type': 'application/json' }, - body: - { encoding: 'Wave', - languageCode: 'en-US', - url: 'https://publicly-facing-url.wav', - sampleRate: 8000}, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - - -### Output - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "/audio/generic/api/v2/async/denoise" -} -``` - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": { - "url": "https://time-limited.wav", - "sampleRate": 8000, - "encoding": "FLAC", - "languageCode": "en-US" - } -} -``` - - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | - -> Exactly one of url and content should be passed. In case both values are passed, error is thrown - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id | This defaults to the originally sent id or is generated by the api. | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| url | String | A time-limited one time access url of the file. | | \ No newline at end of file diff --git a/docs/authentication.html b/docs/authentication.html new file mode 100644 index 0000000..309f34c --- /dev/null +++ b/docs/authentication.html @@ -0,0 +1,45 @@ +Authentication · DeepAffects \ No newline at end of file diff --git a/docs/authentication.md b/docs/authentication.md deleted file mode 100644 index b67d7f7..0000000 --- a/docs/authentication.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: authentication -title: Authentication -sidebar_label: Authentication ---- - -DeepAffects uses API keys to allow access to the API. You can register a new DeepAffects API key at our [developer portal](https://developers.deepaffects.com). -DeepAffects expects for the API key to be included in all API requests to the server along with the base url. - - - - - -```shell -# With shell, you can just pass the correct header with each request -curl "api_endpoint_here?apikey=" -``` - - - -```python -import deepaffects - -# Configure API key authorization: UserSecurity -deepaffects.configuration.api_key['apikey'] = '' -``` - - - -```javascript -var DeepAffects = require("deep-affects"); -// Configure API key authorization: UserSecurity -var UserSecurity = defaultClient.authentications["UserSecurity"]; -UserSecurity.apiKey = ""; -``` - - -> Make sure to replace `` with `API Key` obtained from [developer portal](https://developers.deepaffects.com). diff --git a/docs/chapter-detection-api.md b/docs/chapter-detection-api.md deleted file mode 100644 index 52894e5..0000000 --- a/docs/chapter-detection-api.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -id: chapter-detection-api -title: Chapter Detection API -sidebar_label: Chapter Detection API ---- - -Chapter Detection API automatically extracts chapters from a video. For each chapter, Optical Character Recognition (OCR) is performed to extract the text in the video frame. If the frame is of a slidedeck, title is also extracted. Thus generating a 'Table of Contents' metadata for the video. - -> Note: This API is in alpha release. - -### POST Request - -`POST https://proxy.api.deepaffects.com/video/generic/api/alpha/async/videochapters` - -### Sample Code - - - -```shell - -# async request -curl -X POST \ -"https://proxy.api.deepaffects.com/video/generic/api/alpha/async/videochapters?apikey=>&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json with content -{"content": "bytesEncodedVideoString", "sampleRate": 8000, "encoding": "MPEG-4", "languageCode": "en-US"} - -# contents of data.json with url -{"url": "https://publicly-facing-url.mp4", "sampleRate": 8000, "encoding": "MPEG-4", "languageCode": "en-US"} - -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/video/generic/api/alpha/async/videochapters" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "MPEG-4", - "languageCode": "en-US", - "sampleRate": 48000 -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.mp4" -# alternatively, passing payload as content: -with open(video_file_name, 'rb') as fin: - video_content = fin.read() -payload["content"] = base64.b64encode(video_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/video/generic/api/alpha/async/videochapters', - qs: - { apikey: '', - webhook: ''}, - headers: - { 'Content-Type': 'application/json' }, - body: - { encoding: 'MPEG-4', - languageCode: 'en-US', - url: 'https://publicly-facing-url.mp4', - sampleRate: 48000 }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - - -### Output - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "/video/generic/api/alpha/async/videochapters" -} -``` - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "chapters": [ - { - "end": 1, - "start": 0, - "confidence": 0.98, - "title": "TITLE" - } - ] - } -} -``` - - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of video file like MP4, MKV etc. | | -| sampleRate | Number | Sample rate of the video file. | | -| languageCode | String | Language of the text in the video file. | [default to 'en-US'] | -| content | String | base64 encoding of the video file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | - -> Exactly one of url and content should be passed. In case both values are passed, error is thrown. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | The actual output of the chapter detection. | The Chapter object is defined below. | - -### Chapter Object - -| Parameter | Type | Description | Notes | -| ------------------- | ------ | ------------------------------------------------ | ---------------------------------------- | -| end | Number | The end time of the chapter. | | -| start | Number | The start time of the chapter. | | -| title | String | The title extracted from the OCR output. | Set if a slide is detected in the frame. | -| title_confidence | Number | The confidence score for the detected title. | | -| category | String | The category of the chapter, eg: slide, demo. | | -| category_confidence | Number | The confidence score for the category detection. | | \ No newline at end of file diff --git a/docs/concepts.html b/docs/concepts.html new file mode 100644 index 0000000..ab5e0ea --- /dev/null +++ b/docs/concepts.html @@ -0,0 +1,35 @@ +Concepts · DeepAffects \ No newline at end of file diff --git a/docs/concepts.md b/docs/concepts.md deleted file mode 100644 index efa5834..0000000 --- a/docs/concepts.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -id: concepts -title: Concepts -sidebar_label: Concepts ---- - -## Rate Limiting - -You can make 5 requests per minute to each API. The requests are capped at 100 requests per day. If you think you’ll need a higher rate limit, drop us a line at support@seernet.io and we can take it forward from there. - -Once you go over the rate limit you will receive a `rate_limit` error response. - -## Webhooks - -Certain requests, such as extracting emotion from a large audio, may have an asynchronous response (since there’s some complex background processing involved). For these requests you give us a webhook URL you want to be called when the request has finished processing. - -To link up your requests to webhooks you can pass a `webhook` parameter when making these calls, containing a custom defined webhook identifier. We’ll pass this identifier back to you with the webhook request. - -If you return anything other than a HTTP 200 status to the webhook POST then we’ll try to deliver the response to the webhook for up to 5 times with an exponential backoff. If we don't receive a 200 response from your server, we stop delivering the response. - -For testing you can create a temporary webhook using https://webhook.site/ - -To know more about webhooks visit https://simonfredsted.com/1583 - -## Sync v/s Async v/s Realtime - -As mentioned above, processing larger audio files take a while and hence we've created async apis specifically for them. - -The sync apis are limited to audio files less than 2 minutes. For files with duration larger than those, use the async variant of the API. - -For realtime processing we've created realtime api's based on grpc which accepts the data in smaller chunks and provides the response in realtime. - -## Audio Encoding - -DeepAffects supports various audio types for ease of integration. As a rule of thumb, we support all the audiotypes which are inherently supported by [ffmpeg](https://trac.ffmpeg.org/wiki/audio%20types). - -A subset of the supported formats is specified as follows: - -1. WAV -2. MP3 -3. PCM (signed/unsigned) (8/16/32/64 bit) (big/little endian) -4. AAC -5. Mulaw -6. MP4 -7. M4A -8. MOV -9. WMV (Windows Media Video) - -> A more exhaustive list can be fetched via `ffmpeg -formats`. - -### Best practices for handling audio data - -1. It is recommended to pass audio without performing any cosmetic/structural changes to the original file. Changes such as encoding/re-encoding/upsampling/downsampling/automatic gain control (AGC) cause a downstream impact on the accuracy of the results. - -2. Store the audio data in a lossless format wherever possible. Lossy audio may have a negative impact on the accuracy of the API. - -3. In case of multiple channels, DeepAffects downmixes it to a single channel during transcoding. diff --git a/docs/depression-prediction-api.html b/docs/depression-prediction-api.html new file mode 100644 index 0000000..185d2fd --- /dev/null +++ b/docs/depression-prediction-api.html @@ -0,0 +1,163 @@ +Depression Predition Api · DeepAffects \ No newline at end of file diff --git a/docs/depression-prediction-api.md b/docs/depression-prediction-api.md deleted file mode 100644 index 7d8aee4..0000000 --- a/docs/depression-prediction-api.md +++ /dev/null @@ -1,162 +0,0 @@ ---- -id: depression-prediction-api -title: Depression Prediction API -sidebar_label: Depression Prediction API ---- - -Depression prediction api predicts whether the audio clip contains a depressed person. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/custom/ellipsis/api/v1/sync/is_depressed` - -`POST https://proxy.api.deepaffects.com/audio/custom/ellipsis/api/v1/async/is_depressed` - - - - - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/custom/ellipsis/api/v1/sync/is_depressed?apikey=" -H 'content-type: application/json' -d @data.json - -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/custom/ellipsis/api/v1/async/is_depressed?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} -``` - - - -```javascript -var DeepAffects = require("deep-affects"); -var defaultClient = DeepAffects.ApiClient.instance; - -// Configure API key authorization: UserSecurity -var UserSecurity = defaultClient.authentications["UserSecurity"]; -UserSecurity.apiKey = ""; - -var apiInstance = new DeepAffects.EllipsisApi(); - -var body = DeepAffects.Audio.fromFile("/path/to/file"); // {Audio} Audio object - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log("API called successfully. Returned data: " + data); - } -}; - -// sync request -apiInstance.syncIsDepressed(body, callback); - -// async request - -apiInstance.asyncIsDepressed(body, callback); -``` - - - -```python -from __future__ import print_statement -import time -import deepaffects -from deepaffects.rest import ApiException -from pprint import pprint - -# Configure API key authorization: UserSecurity -deepaffects.configuration.api_key = '' - -# create an instance of the API class -api_instance = deepaffects.EllipsisApi() -body = deepaffects.Audio.from_file("/path/to/file") # Audio | Audio object that needs to be featurized. - -# sync request -api_response = api_instance.sync_is_depressed(body) -pprint(api_response) - -# async request -webhook = 'https://your/webhook/' # str | The webhook url where result from async resource is posted -request_id = 'request_id_example' # str | Unique identifier for the request (optional) - -api_response = api_instance.async_is_depressed(body, webhook, request_id=request_id) -pprint(api_response) -``` - - - - - - -```shell -# The above sync request returns output: - -True -``` - - -```json -# The above async request returns output: -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "api": "/api/v1/async/is_depressed" -} -``` - - -```json -# The response on the webhook url: -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "depressed": True -} -``` - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Sync) - -| Parameter | Type | Description | Notes | -| --------- | ------- | ---------------------------------------------------- | ----- | -| depressed | Boolean | Whether the clip contains a person who is depressed. | | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------- | ---------------------------------------------------- | ------------------------------------------------------------ | -| request_id | String | The request id. | This the indentifier to link back with the original request. | -| depressed | Boolean | Whether the clip contains a person who is depressed. | | diff --git a/docs/emotion-recognition-api.html b/docs/emotion-recognition-api.html new file mode 100644 index 0000000..3927395 --- /dev/null +++ b/docs/emotion-recognition-api.html @@ -0,0 +1,125 @@ +Emotion Recognition Api · DeepAffects \ No newline at end of file diff --git a/docs/emotion-recognition-api.md b/docs/emotion-recognition-api.md deleted file mode 100644 index de4af4f..0000000 --- a/docs/emotion-recognition-api.md +++ /dev/null @@ -1,194 +0,0 @@ ---- -id: emotion-recognition-api -title: Emotion Recognition API -sidebar_label: Emotion Recognition API ---- - -Emotion recognition api extract emotions from the audio file. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/recognise_emotion` - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/async/recognise_emotion` - -### Sample Code - - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/recognise_emotion?apikey=" -H 'content-type: application/json' -d @data.json - -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/async/recognise_emotion?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} - -# in case of using a url, (urls supported only for async) -{"url": "https://publicly-facing-url.flac", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} -``` - - - -```python -import requests -import base64 - -async_url = "https://proxy.api.deepaffects.com/audio/generic/api/v2/async/recognise_emotion" # async api url -sync_url = "https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/recognise_emotion" # sync api url - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "Wave", - "languageCode": "en-US" -} - -# The api accepts data either as a url or as base64 encoded content -# (urls supported only for async) -# passing payload as url: -payload["url"] = "https://publicly-facing-url.wav" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -# Async Request -response = requests.post(async_url, json=payload, headers=headers, params=querystring) - -# alternatively use sync request for payload upto 1 minute -response = requests.post(sync_url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - - -```javascript -var request = require("request"); - -// you can also use sync url for the sync request -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v2/async/recognise_emotion', - qs: - { apikey: '', - webhook: '' }, - headers: - { 'cache-control': 'no-cache', - 'Content-Type': 'application/json' }, - body: - { url: 'https://publicly-facing-url.flac', - encoding: 'FLAC', - languageCode: 'en-US', - sampleRate: 8000, - metrics: ['all'] }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - -### Output - - - - -```json -[ - { - "emotion": "joy", - "start": 0.0, - "end": 3.0 - },{ - "emotion": "neutral", - "start": 3.0, - "end": 6.0 - } -] -``` - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": [ - { - "emotion": "joy", - "start": 0.0, - "end": 3.0 - },{ - "emotion": "neutral", - "start": 3.0, - "end": 6.0 - } - ] -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. Supported for async only. | - -> Exactly one of url and content should be passed. In case both values are passed, error is thrown. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ---------------------------------------------------------------------- | ----------------------------------------------- | -| apikey | String | The apikey | Required for authentication inside all requests | -| webhook | String | The webhook url at which the responses will be sent | Required for async requests | -| request_id | String | An optional unique id to link async response with the original request | Optional | - -### Output Parameters - -Output is the list of emotion scores. The parameters in emotion scores are as follows: - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------------------------------------------- | ----- | -| emotion | String | Type of emotion. | Possible emotion values: `anger`, `excited`, `frustration`, `happy`, `sad` and `neutral` | - | -| start | Float | Start of the audio segment. | | -| end | Float | end of the audio segment. | | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------- | ------------------------------------------------------------------ | -| request_id | String | The request id | This defaults to the originally sent id or is generated by the api | -| api | String | The api method which was called | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------ | ------------------------------------------------------------------ | -| request_id | String | The request id | This defaults to the originally sent id or is generated by the api | -| response | Object | Response object same as sync api response. | | diff --git a/docs/errors.html b/docs/errors.html new file mode 100644 index 0000000..60de397 --- /dev/null +++ b/docs/errors.html @@ -0,0 +1,64 @@ +Errors · DeepAffects \ No newline at end of file diff --git a/docs/errors.md b/docs/errors.md deleted file mode 100644 index 715c15a..0000000 --- a/docs/errors.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -id: errors -title: Errors -sidebar_label: Errors ---- - -Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The various HTTP status codes we might return are listed below. - -## HTTP Status codes - -| Status Code | Title | Description | -| ----------- | --------------------- | ------------------------------------------- | -| 200 | OK | The request was successful. | -| 202 | OK | The async request was successfully accepted | -| 400 | Bad request | Bad request. | -| 401 | Unauthorized | is invalid. | -| 402 | Over quota | Over plan quota on this endpoint. | -| 404 | Not found | The resource does not exist. | -| 50X | Internal Server Error | An error occurred with our API. | - -## Example error response. - -```json -{ - "fault": { - "faultstring": "Invalid ApiKey", - "detail": { - "errorcode": "oauth.v2.InvalidApiKey" - } - } -} -``` - -## Error types - -All errors are returned in the form of JSON with a type and optional message. - -| Type | Description | -| -------------- | ------------------------------------------------------- | -| params_invalid | Your parameters were not valid. | -| unknown_route | URL was not valid. | -| queued | Lookup queued. Try this request again in a few minutes. | -| rate_limit | The request has been rate limited. | -| api_error | Internal API error. | diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index 118f01d..0000000 --- a/docs/faq.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: faqs -title: Frequently Asked Questions -sidebar_label: Frequently Asked Questions ---- - -## Why am I not able to signup/login to the Developer Portal? - -Deepaffects APIs are only available for corporate or academic users. Create your account with those email ids only. Please write to support@seernet.io for further queries/support. - - -## What are the pricing plans? - -We provide free audio processing for 200 minutes of data across our APIs. For more usage please visit https://www.deepaffects.com/pricing. - - -## Why my async request takes much time to get a 202 response? - -You are probably passing audio stream as `content` in the body request which takes more time to submit the request due to network latency. Even though `content` is supported, we recommend you to use a public facing url and pass it as `url` parameter for faster request submission. - - -## What value should I pass for `audioType` in async requests? - -Use `callcenter` if audio stream has 2-3 speakers. For 4-6 speakers use `meeting`. Use `earnings_calls` if you are analyzing earnings call recordings. - - -## What audio formats are supported? - -DeepAffects supports various audio types for ease of integration. As a rule of thumb, we support all the audiotypes which are inherently supported by [ffmpeg](https://trac.ffmpeg.org/wiki/audio%20types). A more exhaustive list can be fetched via command `ffmpeg -formats`. - - -## What are webhooks and how to use them? - -Webhooks are the user-defined HTTP callbacks. To know more about webhooks visit https://simonfredsted.com/1583. - -To link up your requests to webhooks you can pass a `webhook` parameter when making these calls, containing a custom defined webhook identifier. We’ll pass this identifier back to you with the webhook request. - -For testing you can create a temporary webhook using [webhook.site](https://webhook.site) or [ngrok](https://ngrok.com) - -For obvious reasons, DO NOT use LOCALHOST, 127.0.0.1 for webhook. \ No newline at end of file diff --git a/docs/interaction-analytics-api.md b/docs/interaction-analytics-api.md deleted file mode 100644 index ed05a77..0000000 --- a/docs/interaction-analytics-api.md +++ /dev/null @@ -1,384 +0,0 @@ ---- -id: interaction-analytics-api -title: Interaction Analytics API -sidebar_label: Interaction Analytics API ---- - -Interaction Analytics API is a high level API, that provides all the functionality, such as speaker diarization, speech-to-text, speaker recognition, emotion recognition, summary, intent detection, keywords & conversation metrics, within the one single API call. It simplifies your integration. - -* Abstractive summary - Upto 256 words summary. -* Semantic Keywords - product, competitors, topics & more. -* Intent Recognition - Action Items, Decisions, Budget, Authority, Timeline & more. -* Speaker level conversation Metric - Talk time, Interruptions, Pace, Tone & more. - - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/async/analytics/interaction` - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/async/analytics/interaction?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} - -# in case of using a url -{"url": "https://publicly-facing-url.flac", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} -``` - - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v1/async/analytics/interaction', - qs: - { apikey: '', - webhook: '' }, - headers: - { 'cache-control': 'no-cache', - 'Content-Type': 'application/json' }, - body: - { url: 'https://publicly-facing-url.flac', - encoding: 'FLAC', - languageCode: 'en-US', - sampleRate: 8000, - metrics: ['all'] }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/audio/generic/api/v1/async/analytics/interaction" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "FLAC", - "languageCode": "en-US", - "sampleRate": 8000, - "metrics": ["all"] -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.flac" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - -### Output - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "energy": [ - { - "speaker_id": "0", - "value": 8 - }, - { - "speaker_id": "1", - "value": 2 - } - ], - "interruptions": [ - { - "end": 3.1, - "start": 2.9 - } - ], - "num_speakers": 2, - "pace": [ - { - "speaker_id": "0", - "value": "slow" - }, - { - "speaker_id": "1", - "value": "fast" - } - ], - "questions_asked": [ - { - "questions": [ - { - "end": 293.02, - "start": 292.1, - "text": "Does that make sense?" - } - ], - "speaker_id": "0", - "value": 1 - }, - { - "questions": [ - { - "end": 420.02, - "start": 418.1, - "text": "Sorry, what platform?" - } - ], - "speaker_id": "1", - "value": 1 - } - ], - "segments": [ - { - "emotion": "joy", - "emotion_score": 0.99, - "end": 1, - "speaker_id": "0", - "start": 0, - "text": "this is fun", - "confidence": 0.91 - }, - { - "emotion": "sadness", - "emotion_score": 0.92, - "end": 3, - "speaker_id": "1", - "start": 1, - "text": "not really", - "confidence": 0.98 - }, - { - "emotion": "joy", - "emotion_score": 0.81, - "end": 4.5, - "speaker_id": "0", - "start": 3, - "text": "let's get this going", - "confidence": 0.96 - }, - ... - ], - "talk_to_listen": [ - { - "speaker_id": "0", - "value": "55:45" - }, - { - "speaker_id": "1", - "value": "45:55" - } - ], - "tone": [ - { - "speaker_id": "0", - "value": "excited" - }, - { - "speaker_id": "1", - "value": "sad" - } - ], - "total_speech_duration": 500.5 - } -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | Required | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | Required. [default to 'en-US'] | -| separateSpeakerPerChannel | Boolean | Set to True if the input audio is multi-channel and each channel has a separate speaker. | Optional. [default to `False`] | -| speakerCount | Number | Number of speakers in the file (-1 for unknown speakers). | Optional. [default to -1] | -| audioType | String | Type of the audio based on number of speakers. | Optional. [default to callcenter]. Permitted values: `callcenter`, `meeting`, `earnings_calls`, `interview`, `press_conference`. | -| speakerIds | List[String] | Optional set of speakers to be identified from the call. | Optional. [default to []] | -| doVad | Bool | Apply voice activity detection. | Optional. [default to `False`] | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | -| source | String | The source for the audio file: webex, zoom, gotomeeting, phone. | Optional. | -| metrics | List[String] | List of metrics to be run. Send ['all'] to extract all analytics. | Permitted values in the list: `all`, `emotion`, `energy`, `interruptions`, `pace`, `questions_asked`, `tone`, `talk_to_listen`, `key_phrases`, `summary`, `intents`. | - -> **NOTES:** -> * We recommend using callcenter when there are 2-3 speakers expected to be identified and meeting when 4-6 speakers are expected. -> * Exactly one of url and content should be passed. In case both values are passed, error is thrown. -> * doVad: This parameters is required if you want silence & noise segments removed from the diarization output. We suggest you to set it to True. -> * source: Adding source information enables an enhanced model which is built specifically for those audio sources. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | The actual output of the interaction analytics. | The Interaction-Analytics-Object is defined below. | - -#### Interaction-Analytics-Object - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| num_speakers | Number | The number of speakers detected. | The number of speakers will be equal to `speakerCount` parameter. In case `speakerCount` is set as `-1`, or isn't set, the number of speakers are estimated algorithmically. | -| segments | List[Diarized-Segment] | List of Diarized-Segments. | The Diarized-Segment is defined below. | -| energy | List[SpeakerId-Value] | List of SpeakerId-Value Segments. | The SpeakerId-Value Segment is defined below. | -| interruptions | List[Timed-Segments] | List of Timed-Segments. | The Timed-Segment is defined below. | -| pace | List[SpeakerId-Value] | List of SpeakerId-Value Segments. | The SpeakerId-Value Segment is defined below. | -| questions_asked | List[Question-Asked] | List of Question-Asked Segments. | The Question-Asked Segment is defined below. | -| tone | List[SpeakerId-Value] | List of SpeakerId-Value Segments. | The SpeakerId-Value Segment is defined below. | -| talk_to_listen | List[SpeakerId-Value] | List of SpeakerId-Value Segments. | The SpeakerId-Value Segment is defined below. | -| intent_timings | List[Intent-Timings] | List of Intent-Timings Segments. | The Intent-Timings Segment is defined below. | -| key_phrase_timings | List[KeyPhrase-Timings] | List of KeyPhrase-Timings Segments. | The KeyPhrase-Timings Segment is defined below. | -| extractive_summary | List[Summary-Timings] | The Extractive Summary, it extracts the most relevant sentences from the conversation. | The Summary-Timings Segment is defined below. | -| abstractive_summary | Abstractive-Summary-Object | Short and Long Abstractive Summary | The Abstractive-Summary-Object is defined below | -| calleq | CallEQ-Object | Aggregate level metrics. | The CallEQ-Object is defined below. | - - -#### Diarized-Segment - -| Parameter | Type | Description | Notes | -| ------------- | ------ | ------------------------------------------------------ | ----- | -| speaker_id | String | The speaker id for the corresponding audio segment. | | -| start | Number | Start time of the audio segment in seconds. | | -| end | Number | End time of the audio segment in seconds. | | -| text | String | The transcription output corresponding to the segment. | | -| confidence | Number | The confidence score for the transcribed segment. | | -| emotion | String | Emotion corresponding to the segment. Possible values: `surprise`, `joy`, `trust`, `sadness`, `fear`, `anger`, `disgust` and `neutral`. | Will be computed only if specified via metrics. | -| emotion_score | Number | The confidence score for the emotion. | Will be computed only if emotion is computed. | -| intent | String | Intent corresponding to the segment: Current intent list: `budget`, `authority`, `timing`, `action`, `need`, `decision`. | Will be computed only if specified via metrics. | - -#### SpeakerId-Value Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------------------- | ----- | -| speaker_id | String | The speaker id for the corresponding audio segment. | | -| value | Basic | The value of the parent's key for this speaker. | | - - -#### Timed-Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------- | ----- | -| start | Number | Start time of the audio segment in seconds. | | -| end | Number | End time of the audio segment in seconds. | | - - -#### CallEQ-Object - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| summary | String | Extractive summary comprised of top few sentences from the conversation to present the gist of the call. | | -| summary_timings | List[Summary-Timings] | List of objects with start, end, text. Each text entry comprises of sentences from extractive summary. | Deprecated now. Please use top level `extractive_summary` instead | -| key_phrases | List[String] | Top key phrases in the conversation ranked based on their importance and affinity to a extreme sentiments. | | -| loudness | List[Tuple] | start, end timings of 90% percentile "loud" segments. | | - - -#### Question-Asked Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------------------- | ----- | -| speaker_id | String | The speaker id for the corresponding questions segment. | | -| value | Number | Count of number of questions asked by the speaker. | | -| questions | List[Question-Object] | List of Question-Object. This object describes the exact point in time where the question was asked. | | - -#### Question-Object -| Parameter | Type | Description | Notes | -| --------- | ------ | -------------------------------------------- | ----- | -| start | Number | Start time of the question asked in seconds. | | -| end | Number | End time of the question asked in seconds. | | -| text | String | Text of the question asked. | | - - -#### Intent-Timings Segment - -| Parameter | Type | Description | Notes | -| ------------ | ------ | --------------------------------------------------------- | ---------------------------- | -| speaker_id | String | The speaker id for the corresponding intent segment. | | -| intents | List[Intent-Object] | List of Intent-Object. This object describes the exact point in time where the intent was detected. | | - -#### Intent-Object -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------------------------------------- | ----- | -| start | Number | Start time of the intent detected in seconds. | | -| end | Number | End time of the intent detectd in seconds. | | -| text | String | Text of the intent detected. | | - - -#### KeyPhrase-Timings Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------- | ----- | -| start | Number | Start time of the audio segment in seconds. | | -| end | Number | End time of the audio segment in seconds. | | -| keyphrase | String | The key phrase at the point in time. | | - - -#### Summary-Timings Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------------- | ----- | -| start | Number | Start time of the summary segment in seconds. | | -| end | Number | End time of the summary segment in seconds. | | -| text | String | Text of the summary segment. | | -| score | Number | confidence score for the summary segment | | - -##### Abstractive-Summary-Object -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------ | ----- | -| long | Object | List of Summary-Timings Segment. | the long abstractive summary | -| short | Object | List of Summary-Timings Segment. | the short abstractive summary, typically 1-2 lines | - -> **NOTE:** -> -> * In case of extractive summary, the start and end times refer to the exact time of the segment. -> * In case of abstractive summary, the start and end time refer to the time of text blob which is abstracted. diff --git a/docs/introduction.html b/docs/introduction.html new file mode 100644 index 0000000..2042ee0 --- /dev/null +++ b/docs/introduction.html @@ -0,0 +1,27 @@ +Introduction · DeepAffects \ No newline at end of file diff --git a/docs/introduction.md b/docs/introduction.md deleted file mode 100644 index c3c3405..0000000 --- a/docs/introduction.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: introduction -title: Introduction -sidebar_label: Introduction ---- - -Welcome to the DeepAffects API! The DeepAffects API exposes many of the audio, text & video recognition & analytics capabilities, to empower you to develop speech-enabled applications. The Developer portal provides a variety of resources for working with the DeepAffects REST API, and example components you can use to jump-start your integration. - -The DeepAffects APIs are organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) with Sync and Async options. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON. - -The Realtime API is organized around [GRPC](http://grpc.io). All requests should be made using deepaffects client libraries. diff --git a/docs/paralinguistic-feature-extraction-api.html b/docs/paralinguistic-feature-extraction-api.html new file mode 100644 index 0000000..d1b62fb --- /dev/null +++ b/docs/paralinguistic-feature-extraction-api.html @@ -0,0 +1,186 @@ +Paralinguistic Feature Extraction Api · DeepAffects \ No newline at end of file diff --git a/docs/paralinguistic-feature-extraction-api.md b/docs/paralinguistic-feature-extraction-api.md deleted file mode 100644 index bf6b13a..0000000 --- a/docs/paralinguistic-feature-extraction-api.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -id: paralinguistic-feature-extraction-api -title: Paralinguistic Feature Extraction API -sidebar_label: Paralinguistic Feature Extraction API ---- - -Paralingustic feature extraction api extracts features from audio file as explained in the next section. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/featurize` - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/async/featurize` - -There are two stages in the audio feature extraction methodology: - -1. Short-term feature extraction: It splits the input signal into short-term widnows (frames) and computes a number of features for each frame. This process leads to a sequence of short-term feature vectors for the whole signal. -2. Mid-term feature extraction: Extracts a number of statistcs (e.g. mean and standard deviation) over each short-term feature sequence. - -### Sample Code - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/featurize?apikey=" -H 'content-type: application/json' -d @data.json - -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/async/featurize?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US"} -``` - - - -```python -import deepaffects -from deepaffects.rest import ApiException -from pprint import pprint - -# Configure API key authorization: UserSecurity -deepaffects.configuration.api_key['apikey'] = '' - -# create an instance of the API class -api_instance = deepaffects.FeaturizeApi() -body = deepaffects.Audio.from_file('/path/to/file') # Audio | Audio object that needs to be featurized. - -try: - # featurize an audio file - api_response = api_instance.sync_featurize_audio(body) - pprint(api_response) -except ApiException as e: - print("Exception when calling FeaturizeApi->sync_featurize_audio: %s\n" % e) - -# async request -webhook = 'https://your/webhook/' # str | The webhook url where result from async resource is posted -request_id = 'request_id_example' # str | Unique identifier for the request (optional) - -try: - # featurize an audio file - api_response = api_instance.async_featurize_audio(body, webhook, request_id=request_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling FeaturizeApi->async_featurize_audio: %s\n" % e) -``` - - - -```javascript -var DeepAffects = require("deep-affects"); -var defaultClient = DeepAffects.ApiClient.instance; - -// Configure API key authorization: UserSecurity -var UserSecurity = defaultClient.authentications["UserSecurity"]; -UserSecurity.apiKey = ""; - -var apiInstance = new DeepAffects.FeaturizeApi(); - -var body = DeepAffects.Audio.fromFile("/path/to/file"); // {Audio} Audio object - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log("API called successfully. Returned data: " + data); - } -}; - -// sync request -apiInstance.syncFeaturizeAudio(body, callback); - -// async request -webhook = "http://your/webhook/"; -apiInstance.asyncFeaturizeAudio(body, webhook, callback); -``` - - -### Output - - - -```json -{"mfccs": [[0.1, 0.3, ..], [0.9, 0.2, ..], [0.1, 0.2, ..]], "zcr": [0.1, 0.2, ..], "energy": [0.3, 0.4, ..]} -``` - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - -```json -{ -"request_id": "unique_request_id_corresponding to async request_id", -"response": { - "mfccs": [[0.1, 0.3, ..], [0.9, 0.2, ..], [0.1, 0.2, ..]], - "zcr": [0.1, 0.2, ..], - "energy": [0.3, 0.4, ..]} -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | Semi-Optional | -| url | String | Publicly facing url. | Semi-Optional | - -> Exactly one of url and content should be passed. In case both values are passed, error is thrown. - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters - -| Name | Type | Description | Notes | -| ------ | ------ | ------------------------------------ | ----- | -| mfccs | Number | mel frequency cepstral coefficients. | | -| zcr | Number | zero crossing rate. | | -| energy | Number | energy. | | - -### Available Short Term Features - -| Feature ID | Feature Name | Description | -| ------------------ | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| Zero Crossing Rate | The rate of sign-changes of the signal during the duration of a particular frame. | | -| Energy | The sum of squares of the signal values, normalized by the respective frame length. | | -| MFCCs | Mel Frequency Cepstral Coefficients form a cepstral representation where the | frequency bands are not linear but distributed according to the mel-scale. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------ | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | Response object same as sync api response. | | diff --git a/docs/playbook-api.md b/docs/playbook-api.md deleted file mode 100644 index c2bbb3e..0000000 --- a/docs/playbook-api.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -id: text-playbook-api -title: Playbook API -sidebar_label: Playbook API ---- - -APIs to add, fetch and delete Playbook. - - -### Playbook Add Request - -`POST https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook` - -### Sample Code - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook?apikey=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"playbook": "PLAYBOOK_NAME", "groups":["LIST", "OF", "GROUP_NAMES"]} -``` - - - -### Output - - - -```json -{ - "message": "Success" -} -``` - - -```json -{ - "fault": { - "detail": { - "error_code": "com.deepaffects.BadRequest" - }, - "fault_string": "Invalid payload. Refer API docs." - } -} -``` - - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------------ | ---------------------------------- | -------- | -| playbook | String | Name of the playbook. | Required | -| groups | List[String] | List of group names to be applied. | Required | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ------------------- | ------------------- | -| message | String | Status Message. | Success or Failure. | - - -### Playbook Delete Request - -`DELETE https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook` - -### Sample Code - - - -```shell -curl -X DELETE \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook?apikey=&playbook=" -``` - - - -### Output - - - -```json -{ - "message": "Success" -} -``` - - -```json -{ - "message": "Failure" -} -``` - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | -------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| playbook | String | Playbook name. | Required. | - -### Output Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------- | ------------------- | -| message | String | Status Message. | Success or Failure. | - - -### Playbook Get Request - -Fetches all the playbooks associated with the developer id - -`GET https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook` - -### Sample Code - - - -```shell -curl -X GET \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook?apikey=" -``` - - - -### Output - - - -```json -[ - {"name": "PLAYBOOK_NAME", "groups": ["LIST", "OF", "ENABLED", "GROUPS"]} -] -``` - - -```json -{ - "fault": { - "detail": { - "error_code": "com.deepaffects.BadRequest" - }, - "fault_string": "Invalid request. Refer API docs." - } -} -``` - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters -Response is the list of Playbook-Response Segment - -#### Playbook-Response Segment -| Parameter | Type | Description | Notes | -| --------- | ------------ | ----------------------------------- | ----- | -| name | String | Name of the playbook. | | -| groups | List[String] | List of the groups in the playbook. | | - diff --git a/docs/playbook-group-api.md b/docs/playbook-group-api.md deleted file mode 100644 index 7f9a91d..0000000 --- a/docs/playbook-group-api.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -id: text-playbook-group-api -title: Playbook Group API -sidebar_label: Playbook Group API ---- - -APIs to add, fetch and delete Playbook Groups. - - -### Playbook Group Add Request - -`POST https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group` - -### Sample Code - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group?apikey=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"group": "GROUP_NAME", "group_type": "GROUP_TYPE", "hints": ["LIST", "OF", "HINTS"], "questions": ["LIST", "OF", "QUESTIONS"], "comply": true, "stopwords": ["LIST", "OF", "STOPWORDS"]} -``` - - - -### Output - - - -```json -{ - "message": "Success" -} -``` - - -```json -{ - "fault": { - "detail": { - "error_code": "com.deepaffects.BadRequest" - }, - "fault_string": "Invalid payload. Refer API docs." - } -} -``` - - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------------ | ------------------------------------ | -------------------------------------------------- | -| group | String | Name of the group. | Required. | -| group_type | String | Type of the group. | Required. Permitted values: `intent` or `keyword`. | -| hints | List[String] | Hints for group. | Required. | -| questions | List[String] | Questions for group. | Required if `group_type` is `intent`. | -| stopwords | List[String] | Stopwords for group. | | -| comply | Bool | flag to enable or disable the group. | Default is false. | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------- | ------------------- | -| message | String | Status Message. | Success or Failure. | - - -### Playbook Group Delete Request - -`DELETE https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group` - -### Sample Code - - - -```shell -curl -X DELETE \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group?apikey=&group=" -``` - - - -### Output - - - -```json -{ - "message": "Success" -} -``` - - -```json -{ - "message": "Failure" -} -``` - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| group | String | Group name. | Required. | - -### Output Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------- | ------------------- | -| message | String | Status Message. | Success or Failure. | - - -### Playbook Group Get Request - -Fetches all the groups associated with the developer id - -`GET https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group` - -### Sample Code - - - -```shell -curl -X GET \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/playbook/group?apikey=" -``` - - - -### Output - - - -```json -[ - {"stopwords": [], "comply": false, "hints": ["test2"], "name": "test2", "group_type": "keyword"} -] -``` - - -```json -{ - "fault": { - "detail": { - "error_code": "com.deepaffects.BadRequest" - }, - "fault_string": "Invalid request. Refer API docs." - } -} -``` - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters -Response is the list of Group-Response Segment - -#### Group-Response Segment -| Parameter | Type | Description | Notes | -| ---------- | ------------ | -------------------- | ----- | -| name | String | Name of the group. | | -| group_type | String | Type of the group. | | -| stopwords | List[String] | List of stopwords. | | -| comply | Bool | Enabled or disabled. | | -| hints | List[String] | List of hints . | | diff --git a/docs/quick-start.html b/docs/quick-start.html new file mode 100644 index 0000000..a2e5ae4 --- /dev/null +++ b/docs/quick-start.html @@ -0,0 +1,44 @@ +Quickstart Guide · DeepAffects \ No newline at end of file diff --git a/docs/quick-start.md b/docs/quick-start.md deleted file mode 100644 index aa7f29f..0000000 --- a/docs/quick-start.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: quick-start -title: Quickstart Guide -sidebar_label: Quickstart Guide ---- - -## Setting up - -1. First time users: If you want to use DeepAffects's public API, you must have a free account and API key. To create an account and receive register at our [developer portal](https://developers.deepaffects.com/). Once registered, an API Key will be auto-generated for you. Use this API Key in place of in the examples below. - -2. Returning users: If you already have an account, you can always retrieve and manage your API usage on your DeepAffects [dashboard](https://developers.deepaffects.com) after logging in. - -## Choose API Product - -Currently, deepaffects provides 2 audio based products: - -1. **Generic Audio Analysis**: Generic Audio Analysis contains APIs like: Denoising API, Speaker Diarization API, Paralinguistic Feature Extraction API, Speaker Enrollment API, Text Independent Speaker Identification API, Voice Activity Detection API, Emotion Extraction API, Interaction Analytics API, Speech-To-Text(ASR) API. The APIs in this product are available for use to all developers. The developer has the ability to activate only specific set of APIs by switching them on in the dashboard. - -2. **Generic Text Analysis**: Generic Text Analysis contains Smart Punctuation API, Text Emotion API, Playbook/Group API. More APIs are coming soon. - -3. **Generic Video Analysis**: Generic Video Ananlysis contains Chapter Detection API. - -## Choose your language - -For your convenience, DeepAffects has provided native language bindings in Python and NodeJs! You can get started with the help of sample code provided. - -Don't worry if the programming language you want to use DeepAffects with, is not listed. DeepAffects suite of APIs can also be used directly through RESTful API calls with the help of API endpoints and necessary params provided with the API details. - -### Installation - -1. **Python**: The python client source can be found at [github](https://github.com/SEERNET/deepaffects-python). The installation instruction can be found in the readme. -2. **Nodejs**: The nodejs api client source can be found at [github](https://github.com/SEERNET/deepaffects-node). The installation instruction can be found in the readme. diff --git a/docs/realtime-emotion-recognition-api.html b/docs/realtime-emotion-recognition-api.html new file mode 100644 index 0000000..b9e92f7 --- /dev/null +++ b/docs/realtime-emotion-recognition-api.html @@ -0,0 +1,131 @@ +Realtime Emotion Recognition Api · DeepAffects \ No newline at end of file diff --git a/docs/realtime-emotion-recognition-api.md b/docs/realtime-emotion-recognition-api.md deleted file mode 100644 index 4281d51..0000000 --- a/docs/realtime-emotion-recognition-api.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -id: realtime-emotion-recognition-api -title: Realtime Emotion Recognition API -sidebar_label: Realtime Emotion Recognition API ---- - -Realtime emotion recognition api Extracts basic emotions from the audio file in realtime. - -### Grpc Call - -`client.IdentifyEmotion( chunk_generator(), TIMEOUT_SECONDS, metadata=metadata)` - -### Sample Code - -### Python - -```python -from deepaffects.realtime.util import chunk_generator_from_file, chunk_generator_from_url, get_deepaffects_client - -TIMEOUT_SECONDS = 2000 -apikey = "YOUR_API_KEY" - -# Set file_path as local file path or audio stream or youtube url -file_path = "FILE_PATH" - -# Set is_youtube_url True while streaming from youtube url -is_youtube_url = False -languageCode = "en-Us" -sampleRate = "16000" -encoding = "wav" - -# DeepAffects realtime Api client -client = get_deepaffects_client() - -metadata = [ - ('apikey', apikey), - ('encoding', encoding), - ('samplerate', sampleRate), - ('languagecode', languageCode) -] - -"""Generator Function - -chunk_generator_from_file is the Sample implementation for generator funcion which reads audio from a file and splits it into -base64 encoded audio segment of more than 3 sec -and yields SegmentChunk object using segment_chunk - -""" - -# from deepaffects.realtime.types import segment_chunk -# segment_chunk(Args) - -"""segment_chunk. - -Args: - encoding : Audio Encoding, - languageCode: language code , - sampleRate: sample rate of audio , - content: base64 encoded audio, - segmentOffset: offset of the segment in complete audio stream -""" - -# Call client api function with generator and metadata - -responses = client.IdentifyEmotion( - # Use chunk_generator_from_file generator to stream from local file - chunk_generator_from_file(file_path), - # Use chunk_generator_from_url generator to stream from remote url or youtube with is_youtube_url set to true - # chunk_generator_from_url(file_path, is_youtube_url=is_youtube_url), - TIMEOUT_SECONDS, metadata=metadata) - -# responses is the iterator for all the response values -for response in responses: - print("Received message",response) - -"""Response. - response = { - emotion: Emotion identified in the segment, - start: start of the segment, - end: end of the segment - } -""" -``` - -### Metadata Parameters - -Metadata params are set once for an api call : - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ------------------------------------------------ | -| apikey | String | Apikey obtained from developer portal. | Required for authentication inside all requests. | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | - -### Segment Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------------------------------- | --------- | -| content | String | base64 encoding of the audio segment. | | -| offset | Number | Segment offset from start of the audio. | | -| duration | Number | Duration of chunk. | Optional. | - -### Output Response Stream - -Output is the iterator streaming response objects with following parameters: - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------------------------------------------- | ----- | -| emotion | String | Type of emotion like Happy, Sad, Surprised etc. | | -| start | Float | Start of the audio segment. | | -| end | Float | end of the audio segment. | | diff --git a/docs/realtime-speaker-identification-api.html b/docs/realtime-speaker-identification-api.html new file mode 100644 index 0000000..d1882c1 --- /dev/null +++ b/docs/realtime-speaker-identification-api.html @@ -0,0 +1,136 @@ +Realtime Speaker Identification Api · DeepAffects \ No newline at end of file diff --git a/docs/realtime-speaker-identification-api.md b/docs/realtime-speaker-identification-api.md deleted file mode 100644 index 9e6edee..0000000 --- a/docs/realtime-speaker-identification-api.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -id: realtime-speaker-identification-api -title: Realtime Speaker Identification API -sidebar_label: Realtime Speaker Identification API ---- - -Realtime speaker identification api identifies speakers from the audio file in realtime. - -> Enroll user using [Speaker Enrollment Api](./speaker-enrollment-api.html) before using identification api. - -
-> Install deepaffects python library to use this api using `pip install deepaffects`. - -### Grpc Call - -`client.IdentifySpeaker( chunk_generator(), TIMEOUT_SECONDS, metadata=metadata)` - -### Sample Code - -### Python - -```python -from deepaffects.realtime.util import chunk_generator_from_file, chunk_generator_from_url, get_deepaffects_client - -TIMEOUT_SECONDS = 2000 -apikey = "YOUR_API_KEY" -# Set file_path as local file path or audio stream or youtube url -file_path = "FILE_PATH" - -# Set is_youtube_url True while streaming from youtube url -is_youtube_url = False -languageCode = "en-Us" -sampleRate = "16000" -encoding = "wav" -speakerIds = "list of speakerIds to be identified seperated by ','" - -# DeepAffects realtime Api client -client = get_deepaffects_client() - -metadata = [ - ('apikey', apikey), - ('speakerids', speakerIds), - ('encoding', encoding), - ('samplerate', sampleRate), - ('languagecode', languageCode) -] - -"""Generator Function - -chunk_generator_from_file is the Sample implementation for generator funcion which reads audio from a file and splits it into -base64 encoded audio segment of more than 3 sec -and yields SegmentChunk object using segment_chunk -""" - -# from deepaffects.realtime.types import segment_chunk -# segment_chunk(Args) - -"""segment_chunk. - -Args: - encoding : Audio Encoding, - languageCode: language code , - sampleRate: sample rate of audio , - content: base64 encoded audio, - segmentOffset: offset of the segment in complete audio stream -""" - -# Call client api function with generator and metadata - -responses = client.IdentifySpeaker( - # Use chunk_generator_from_file generator to stream from local file - chunk_generator_from_file(file_path), - # Use chunk_generator_from_url generator to stream from remote url or youtube with is_youtube_url set to true - # chunk_generator_from_url(file_path, is_youtube_url=is_youtube_url), - TIMEOUT_SECONDS, metadata=metadata) - - -# responses is the iterator for all the response values -for response in responses: - print("Received message",response) - -"""Response. - response = { - speakerId: speakerId identified in the segment, - start: start of the segment, - end: end of the segment - } -""" -``` - -### Metadata Parameters - -Metadata params are set once for an api call : - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ------------------------------------------------ | ------------------------------------------------ | -| apikey | String | Apikey obtained from developer portal. | Required for authentication inside all requests. | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| speakerIds | String | list of speakerIds to identify seperated by ','. | | - -### Segment Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------------------------------- | --------- | -| content | String | base64 encoding of the audio segment. | | -| offset | Number | Segment offset from start of the audio. | | -| duration | Number | Duration of chunk. | Optional. | - -### Output Response Stream - -Output is the iterator streaming response objects with fowllowing parameters: - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------- | ----- | -| speaker_id | String | id of the identified speaker. | | -| start | Float | Start of the audio segment. | | -| end | Float | end of the audio segment. | | diff --git a/docs/speaker-diairization-api.html b/docs/speaker-diairization-api.html new file mode 100644 index 0000000..9a3a8cd --- /dev/null +++ b/docs/speaker-diairization-api.html @@ -0,0 +1,181 @@ +Speaker Diarization Api · DeepAffects \ No newline at end of file diff --git a/docs/speaker-diarization-api.md b/docs/speaker-diarization-api.md deleted file mode 100644 index f8ae09a..0000000 --- a/docs/speaker-diarization-api.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -id: speaker-diarization-api -title: Speaker Diarization API -sidebar_label: Speaker Diarization API ---- - -Speaker Diarization API partitions audio stream into homogenous segments according to the speaker identity. It solves the problem of "Who Speaks When". This API splits audio clip into speech segments and tags them with speaker's id accordingly. This api also supports speaker identification. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarize` - -### Sample Code - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarize?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", "speakerCount": -1, "audioType": "callcenter", "speakerIds":["speaker1"]} -``` - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarize', - qs: - { apikey: '', - webhook: ''}, - headers: - { 'Content-Type': 'application/json' }, - body: - { encoding: 'Wave', - languageCode: 'en-US', - url: 'https://publicly-facing-url.wav', - sampleRate: 8000, - doVad: true, - speakerCount: -1, - audioType: "callcenter" }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarize" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "Wave", - "languageCode": "en-US", - "speakerCount": -1, - "doVad": True, - "audioType": "callcenter" -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.wav" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - - -### Output - - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": { - "num_speakers": 2, - "segments":[ - { - "speaker_id": "speaker1", - "start": 0, - "end": 1 - } - ] - } -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | -------------------------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | Required. | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | Required. [default to 'en-US'] | -| separateSpeakerPerChannel | Boolean | Set to True if the input audio is multi-channel and each channel has a separate speaker. | Optional. [default to `False`] | -| speakerCount | Number | Number of speakers in the file(-1 for unknown speakers). | Optional. [default to -1] | -| audioType | String | Type of the audio based on number of speakers. | Optional. [default to callcenter]. Permitted values: `callcenter`, `meeting`, `earnings_calls`, `interview`, `press_conference`. | -| speakerIds | List[String] | Optional set of speakers to be identified from the call. | Optional. [default to []] | -| doVad | Bool | Apply voice activity detection. | Optional. [default to `False`] | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | -| source | String | The source for the audio file: webex, zoom, gotomeeting, phone. | Optional. | - -> **NOTES:** -> * We recommend using callcenter when there are 2-3 speakers expected to be identified and meeting when 4-6 speakers are expected. -> * Exactly one of url and content should be passed. In case both values are passed, error is thrown. -> * doVad: This parameters is required if you want silence & noise segments removed from the diarization output. We suggest you to set it to True. -> * source: Adding source information enables an enhanced model which is built specifically for those audio sources. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | --------------- | ------------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Diarized-Object | The actual output of the diarization. | The Diarized-Object is defined below. | - -#### Diarized-Object - -| Parameter | Type | Description | Notes - | -| ------------ | ---------------------- | -------------------------------- | -------------------------------------------------------------------------------- | -| num_speakers | Number | The number of speakers detected. | The number of speaker will be detected only when the request set speakers to -1. | -| segments | List[Diarized-Segment] | List of diarized segments. | The Diarized-Segment is defined below. | - -#### Diarized-Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------------------- | ----- | -| speaker_id | String | The speaker id for the corresponding audio segment. | | -| start | Number | Start time of the audio segment in seconds. | | -| end | Number | End time of the audio segment in seconds. | | diff --git a/docs/speaker-enrollment-api.html b/docs/speaker-enrollment-api.html new file mode 100644 index 0000000..93b16dd --- /dev/null +++ b/docs/speaker-enrollment-api.html @@ -0,0 +1,125 @@ +Speaker Enrollment/Deletion Api · DeepAffects \ No newline at end of file diff --git a/docs/speaker-enrollment-api.md b/docs/speaker-enrollment-api.md deleted file mode 100644 index c0d5721..0000000 --- a/docs/speaker-enrollment-api.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -id: speaker-enrollment-api -title: Speaker Enrollment API -sidebar_label: Speaker Enrollment API ---- - -

Speaker Enrollment API for Text Independent Speaker Identification (REST Api)

- -Speaker Enrollment process is *text independent*. This implies that there are no restrictions on what the speaker says in the audio and hence no specific passphrases are required during the process. Speaker Enrollment API enrolls user for [TI Speaker Identification Api](./speaker-identification-api.html), [Realtime Speaker Identification Api](./realtime-speaker-identification-api.html), -[Speaker Diarization Api](./speaker-diarization-api.html). - - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/enroll` - -### Sample Code - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/enroll?apikey=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", "speakerId": "speaker1" } -``` - - - -### Output - - - -```json -{ - "enroll_quality": "average", - "enrollment_complete": true, - "message": "Success", - "speaker_id": "speaker1", - "total_enroll_duration": 30.0, - "total_speech_duration": 20.0 -} -``` - - -```json -{ - "fault": { - "detail": { - "error_code": "com.deepaffects.BadRequest" - }, - "fault_string": "Error in enroll: Insufficent speech content in audio" - } -} -``` - - - -> **NOTES:** -> * Enroll a user with three to five audio samples of 12-24 seconds each, no more than 30 seconds, and with at least 10 seconds, where there's continuous speech, no silence, and preferably no background noise. -> * Ideally, only enroll multiple audio samples when they show the diversity in the person's speech, and do not use multiple samples from same audio recording. -> * Enrollments with less than 6 seconds of speech will be rejected. -> * You may add the additional audio samples to a speakerId over an extended time period. -> * If total speech duration of an enrollment is less than 12 seconds, the enrollment will be treated as incomplete and `enrollment_complete` will be set to `false`. -> * Enrollments with status `enrollment_complete=true` will be considered for identification, otherwise it would return error message. - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------ | ----------------------------------------- | ---------------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| content | String | base64 encoding of the audio file. | | -| speakerId | String | speaker id to be registered. | acceptable format: `[a-zA-Z0-9_]+` | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters (Sync) - -| Parameter | Type | Description | Notes | -| --------------------- | ------ | ---------------------------------------- | -------------------------------------- | -| message | String | Status of enrollment Success. | Success: enrollment is successfull. | -| speaker_id | String | Registered speaker id. | | -| enroll_quality | String | Quality of the enrollment. | values: poor, average, good, high. | -| enrollment_complete | Bool | Status of the enrollment. | `True` if total speech exceeds 12sec. | -| total_speech_duration | Number | Total Speech Duration of the enrollment. | | -| total_enroll_duration | Number | Total Duration of the enrollment. | | - -### Speaker Enrollment Delete API (REST Api) - -This API deletes speaker enrollment for the user. - -### POST Request - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/diarization/delete` - -### Sample Code - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/diarization/delete?apikey=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"speakerId": "user1"} -``` - - - -### Output -```json -# The above command returns output: -{ - "message": "Success" -} -``` - -### Body Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ---------------------------- | ----- | -| speakerId | String | speaker id to be registered. | | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters (Sync) - -| Parameter | Type | Description | Notes | -| --------- | ------ | --------------- | ------------------- | -| message | String | Request status. | Success or Failure. | - - -### Get Speaker Enrollment Status Api - -This API fetches the status of speaker enrollment for a developer - -### GET Request - -`GET https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/enroll` - -### Sample Code - - - - -```shell -curl -X GET \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/enroll?apikey=&speakerId=" -``` - - - -### Output - -```json -# The above command returns output: -{ - "speaker_id": "speaker_1", - "enrollment_complete":true, - "total_speech_duration": 20.0, - "total_enroll_duration": 30.0, - "enroll_quality": "average" -} -``` - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ---------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| speakerId | String | speaker id whose details to be fetched. | | - - -### Get All Enrolled Speakers Api - -This API lists all the completely enrolled speakers for a developer along with other data. - -### GET Request - -`GET https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/diarization/get_enrolled_speakers` - -### Sample Code - - - - -```shell -curl -X GET \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/sync/diarization/get_enrolled_speakers?apikey=" -``` - - - -### Output - -```json -# The above command returns output: -{ - "developer_id": "testuser", - "enrolled_speaker_ids": [ - { - "speaker_id": "speaker_1", - "enrollment_complete":true, - "total_speech_duration": 20.0, - "total_enroll_duration": 30.0, - "enroll_quality": "average" - } - ] -} -``` - -### Query Parameters - -| Parameter | Type | Description | Notes | -| -------------- | ------ | ----------------- | -------------------------------------------------------------------------------- | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| getAllSpeakers | Bool | `True` or `False` | Set to `True` for fetching incomplete enrolled speakers too. Default to `False`. | diff --git a/docs/speaker-identification-api.html b/docs/speaker-identification-api.html new file mode 100644 index 0000000..e56e527 --- /dev/null +++ b/docs/speaker-identification-api.html @@ -0,0 +1,153 @@ +Speaker Identification Api · DeepAffects \ No newline at end of file diff --git a/docs/speaker-identification-api.md b/docs/speaker-identification-api.md deleted file mode 100644 index d4176ac..0000000 --- a/docs/speaker-identification-api.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -id: speaker-identification-api -title: Text Independent Speaker Identification API -sidebar_label: Speaker Identification API ---- - -Text Independent Speaker Identification API tries to figure out *"Who Speaks When"* for already enrolled speakers. *Text Independent* implies that there are no restrictions on what the speaker says in the audio and therefore no specific passphrase is required during enrollment or identification. - -The algorithm splits audio clip into segments corresponding to a unique speaker and then compares its features with the voiceprints of the specified speakers in the request. Finally, the API returns start and end of the segment with the identified speaker. In cases where no user is identified, the segments are marked as `UserNotIdentified`. - -> Enroll user using [Speaker Enrollment Api](./speaker-enrollment-api.html) before using identification api. - -### POST Request - -### Async - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarization/identify` - -### Sync - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/identify` - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/async/diarization/identify?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/identify?apikey=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", speakerIds: ["user1"]} -``` - - - -### Output - - - - -```json -{ - "segments": - [{ - "speaker_id": "speaker1", - "start": 0, - "end": 1 - }] -} -``` - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": { - "segments": - [{ - "speaker_id": "speaker1", - "start": 0, - "end": 1 - }] -} -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ------------ | ------------ | ----------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| speakerIds | List[String] | List of enrolled speakers to identify. | | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | - -> NOTE: Exactly one of url and content should be passed. In case both values are passed, error is thrown. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ---------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| segments | List | List of identified segments. | The Speaker Identification Segment object is defined below. | - -#### Speaker Identification Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------- | ----- | -| speaker_id | String | speaker id of the identified speaker. | | -| start | Float | Start of the audio segment. | | -| end | Float | end of the audio segment. | | diff --git a/docs/text-emotion-recognition-api.html b/docs/text-emotion-recognition-api.html new file mode 100644 index 0000000..13ffafc --- /dev/null +++ b/docs/text-emotion-recognition-api.html @@ -0,0 +1,121 @@ +Text Emotion Recognition Api · DeepAffects \ No newline at end of file diff --git a/docs/text-emotion-recognition-api.md b/docs/text-emotion-recognition-api.md deleted file mode 100644 index 9788990..0000000 --- a/docs/text-emotion-recognition-api.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: text-emotion-recognition-api -title: Text Emotion Recognition API -sidebar_label: Text Emotion Recognition API ---- - -Text Emotion API extracts emotions from the paragraph of text. - -### POST Request - -`POST https://proxy.api.deepaffects.com/text/generic/api/latest/sync/text_recognise_emotion` - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/text/generic/api/latest/sync/text_recognise_emotion?apikey=" -H 'content-type: application/json' -d @data.json - - -# contents of data.json -{ - "content": "YOUR_TEXT" -} -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/text/generic/api/v1/sync/text_recognise_emotion" -querystring = {"apikey":""} -payload = {"content": "YOUR_TEXT"} -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) -print(response.text) -``` - - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/text/generic/api/v1/sync/text_recognise_emotion', - qs: - { apikey: ''}, - headers: - { 'cache-control': 'no-cache', - 'Content-Type': 'application/json' }, - body: - { content: 'YOUR_TEXT'}, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - - - -### Output - -```shell -# Sync: - -{ -"version": "1.0.5", -"response": { - "neutral": 0.7 - } -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ----- | -| content | String | Text. | | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | - -### Output Parameters - -Output is the list of emotion scores. The parameters in emotion scores are as follows: - -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------------------------------- | ----- | -| version | String | API Version. | | -| response | Object | Object with emotion and confidence. | Possible values: `surprise`, `joy`, `trust`, `sadness`, `fear`, `anger`, `disgust` and `neutral`. | diff --git a/docs/text-punctuation-api.md b/docs/text-punctuation-api.md deleted file mode 100644 index 366b745..0000000 --- a/docs/text-punctuation-api.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -id: text-punctuation-api -title: Smart Punctuation API -sidebar_label: Smart Punctuation API ---- - -Do you've incorrectly formatted or unformatted text? The DeepAffects Smart Punctuation takes a text blob and adds relevant punctuations to the text. The Punctuation API is specifically trained to accurately punctuate noisy asr output. - -Currently, the following punctuations are added to the text: -* Fullstop: `.` -* Comma: `,` -* Quotes: `'` `"` -* Question Mark: `?` -* Exclamation Mark: `!` -* Text capitalization: First letter capitalization and entire word capitalization (in case of acronyms). - -### POST Request - -### Async - -`POST https://proxy.api.deepaffects.com/text/generic/api/v1/async/punctuate` - -### Sample Code - - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/text/generic/api/v1/async/punctuate?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"texts": ["so its more fluid than it is and you know its not the best kind of feedback right"]} -``` - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/text/generic/api/v1/async/punctuate', - qs: - { apikey: '', - webhook: '' }, - headers: - { 'Content-Type': 'application/json' }, - body: - { texts: ["so its more fluid than it is and you know its not the best kind of feedback right"]}, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/text/generic/api/v1/async/punctuate" - -querystring = {"apikey":"", "webhook":""} - -payload = {"texts": ["so its more fluid than it is and you know its not the best kind of feedback right"]} - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - -### Output - - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "punctuated_texts": - ["So it's more fluid than it is, and you know it's not the best kind of feedback, right?"] - } -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| --------- | ----------- | ------------------------------- | ----- | -| texts | List | List of unformatted text blobs. | | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------------------------------ | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | List of punctuated texts corresponding to the original input text. | | - - -> Note: The order in the list for the punctuated texts matches that of the input text. diff --git a/docs/text-summary-api.md b/docs/text-summary-api.md deleted file mode 100644 index eacc6c9..0000000 --- a/docs/text-summary-api.md +++ /dev/null @@ -1,277 +0,0 @@ ---- -id: text-summary-api -title: Conversational Summarization API -sidebar_label: Conversational Summarization API ---- - -The Conversation Summarization API allows you to summarize the meaning of an audio transcript (speaker tagged), extracting its most relevant part of the conversation. The API provides two types of summaries: - -Abstractive - Text summarization aims to understand the meaning behind a text and communicate it in newly generated sentences. - -Extractive - Extracting the most relevant sentences. Its suited for the sales call, customer support call, virtual meetings, podcasts & more. - -You can also pass id of the speaker as the part of request to get the speaker aware summaries(both extractive and abstractive). - -### POST Request - -### Async - -`POST https://proxy.api.deepaffects.com/text/generic/api/v1/async/summary` - -### Sample Code - - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/text/generic/api/v1/async/summary?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"summaryType": "abstractive", "model": "iamus", "summaryData": [{"speakerId":"spk", "text":"text blob for speaker"}]} -``` - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/text/generic/api/v1/async/summary', - qs: - { apikey: '', - webhook: '' }, - headers: - { 'Content-Type': 'application/json' }, - body: - {summaryType: "abstractive", model: "iamus", summaryData: [{speakerId:"spk", text:"text blob for speaker"}]}, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/text/generic/api/v1/async/summary" - -querystring = {"apikey":"", "webhook":""} - -payload = {"summaryType": "abstractive", "model": "iamus", "summaryData": [{"speakerId":"spk", "text":"text blob for speaker"}]} - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - -### Async Output - - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - - - -### Webhook Output`(depends on summaryType)` - - - - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "extractive": [ - { - "end": 1.0, - "start": 0.0, - "text": "Summary line 1", - "score": 0.8 - }, - { - "end": 7.0, - "start": 5.0, - "text": "Summary line 2", - "score": 0.9 - }, - ... - ] - } -} -``` - - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "abstractive": { - "long": [ - { - "end": 1.0, - "start": 0.0, - "text": "Long summary line 1", - "score": 0.8 - }, - { - "end": 7.0, - "start": 5.0, - "text": "Long summary line 2", - "score": 0.9 - }, - ... - ], - "short": [ - { - "end": 7.0, - "start": 0.0, - "text": "Short summary line 1", - "score": 0.8 - } - ] - } - } -} - -``` - - -```json -{ - "request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", - "response": { - "abstractive": { - "long": [ - { - "end": 1.0, - "start": 0.0, - "text": "Long summary line 1", - "score": 0.8 - }, - { - "end": 7.0, - "start": 5.0, - "text": "Long summary line 2", - "score": 0.9 - }, - ... - ], - "short": [ - { - "end": 7.0, - "start": 0.0, - "text": "Short summary line 1", - "score": 0.8 - } - ] - }, - "extractive": [ - { - "end": 1.0, - "start": 0.0, - "text": "Summary line 1", - "score": 0.8 - }, - { - "end": 7.0, - "start": 5.0, - "text": "Summary line 2", - "score": 0.9 - }, - ... - ] - } -} - -``` - - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| ----------- | ------------------ | ------------------------------- | ----------------------- | -| summaryType | String | Permitted values: `extractive`, `abstractive`, `all`. | Default is `extractive`. Pass `all` to compute both `extractive` and `abstractive` type of summaries. | -| summaryData | List[Summary-Data] | List of speakerId, text object. | | -| model | String | The model for abstractive summary. Permitted values: `mopsus`, `iamus`, `cassandra` | Optional, default is `mopsus` | - - -### Summary-Data -| Parameter | Type | Description | Notes | -| --------- | ------ | ----------------------------- | ------------------------------------------------------------------------------------------- | -| speakerId | String | Speaker id for the text blob | Optional, abstractive summary uses speakerId to reference in the output | -| text | String | Text blob for summary | Required | -| start | Number | start time of the segment | Optional | -| end | Number | start time of the segment | Optional | - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ---------| -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | -------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - - -### Output Parameters (Webhook): `extractive` - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------------------------------------- | ------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | key `extractive`, value: List of Summary-Timings Segment. | | - -### Output Parameters (Webhook): `abstractive` - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ---------------------------------------------------------------- | ------------| -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| response | Object | key `abstractive`, value: Abstractive-Summary Object. | | - - -### Abstractive-Summary Object -| Parameter | Type | Description | Notes | -| ---------- | ------ | ------------------------------------------ | ----- | -| long | Object | List of Summary-Timings Segment. | the long abstractive summary | -| short | Object | List of Summary-Timings Segment. | the short abstractive summary, typically 1-2 lines | - - -### Summary-Timings Segment - -| Parameter | Type | Description | Notes | -| ---------- | ------ | --------------------------------------------- | ----- | -| start | Number | Start time of the summary segment in seconds. | Conditional on input payload | -| end | Number | End time of the summary segment in seconds. | Conditional on input payload | -| text | String | Text of the summary segment. | | -| score | Number | confidence score for the summary segment | | - -> **NOTE:** -> -> * In case of extractive summary, the start and end times refer to the exact time of the segment. -> * In case of abstractive summary, the start and end time refer to the time of text blob which is abstracted. -> * The start, end times are returned if they're part of the input payload - diff --git a/docs/voice-activity-detection-api.md b/docs/voice-activity-detection-api.md deleted file mode 100644 index 5b1951c..0000000 --- a/docs/voice-activity-detection-api.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -id: voice-activity-detection-api -title: Voice Activity Detection API -sidebar_label: Voice Activity Detection API ---- - -Voice activity detection (VAD) is a technique used in speech processing to detect the presence (or absence) of human speech. The DeepAffects Voice activity detection API analyzes the audio input and tags specific segments where human speech is detected. We additionaly tag non-speech segments with additional metadata such as noise, music, applause or laughter for additional down stream processing. - - -### POST Request - -### Async - -`POST https://proxy.api.deepaffects.com/audio/generic/api/v1/async/vad` - -### Sample Code - - - - - -```shell -curl -X POST \ -"https://proxy.api.deepaffects.com/audio/generic/api/v1/async/vad?apikey=&webhook=" -H 'content-type: application/json' -d @data.json - -# contents of data.json -{"content": "bytesEncodedAudioString", "sampleRate": 8000, "encoding": "FLAC", "languageCode": "en-US", "minNonSpeechDuration": 1} -``` - - -```javascript -var request = require("request"); - -var options = { method: 'POST', - url: 'https://proxy.api.deepaffects.com/audio/generic/api/v1/async/vad', - qs: - { apikey: '', - webhook: '' }, - headers: - { 'Content-Type': 'application/json' }, - body: - { languageCode: 'en-US', - sampleRate: '8000', - url: 'https://publicly-facing-url.wav', - minNonSpeechDuration: 1 }, - json: true }; - -request(options, function (error, response, body) { - if (error) throw new Error(error); - - console.log(body); -}); - -``` - - -```python -import requests -import base64 - -url = "https://proxy.api.deepaffects.com/audio/generic/api/v1/async/vad" - -querystring = {"apikey":"", "webhook":""} - -payload = { - "encoding": "Wave", - "languageCode": "en-US", - "minNonSpeechDuration": 1 -} - -# The api accepts data either as a url or as base64 encoded content -# passing payload as url: -payload["url"] = "https://publicly-facing-url.wav" -# alternatively, passing payload as content: -with open(audio_file_name, 'rb') as fin: - audio_content = fin.read() -payload["content"] = base64.b64encode(audio_content).decode('utf-8') - -headers = { - 'Content-Type': "application/json", -} - -response = requests.post(url, json=payload, headers=headers, params=querystring) - -print(response.text) -``` - - -### Output - - - - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"api": "requested_api_name" -} -``` - -```json -{ -"request_id": "8bdd983a-c6bd-4159-982d-6a2471406d62", -"response": { - "segments": - [{ - "tag": "speech", - "start": 0, - "end": 1 - },{ - "tag": "laughter", - "start": 1, - "end": 3 - }] -} -} -``` - - -### Body Parameters - -| Parameter | Type | Description | Notes | -| -------------------- | ------ | ---------------------------------------------- | ---------------------------- | -| encoding | String | Encoding of audio file like MP3, WAV etc. | | -| sampleRate | Number | Sample rate of the audio file. | | -| languageCode | String | Language spoken in the audio file. | [default to 'en-US'] | -| minNonSpeechDuration | Number | The minimum duration for a non-speech segment. | Optional, defaults to 0. | -| content | String | base64 encoding of the audio file. | Semi-Optional. | -| url | String | Publicly facing url. | Semi-Optional. | - -> NOTE: Exactly one of url and content should be passed. In case both values are passed, error is thrown. - - -### Query Parameters - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ----------------------------------------------------------------------- | ------------------------------------------------ | -| apikey | String | The apikey. | Required for authentication inside all requests. | -| webhook | String | The webhook url at which the responses will be sent. | Required for async requests. | -| request_id | String | An optional unique id to link async response with the original request. | Optional. | - -### Output Parameters (Async) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | -------------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| api | String | The api method which was called. | | - -### Output Parameters (Webhook) - -| Parameter | Type | Description | Notes | -| ---------- | ------ | ---------------------------- | ------------------------------------------------------------------- | -| request_id | String | The request id. | This defaults to the originally sent id or is generated by the api. | -| segments | List | List of identified segments. | The Voice Activity Detection Segment object is defined below . | - -#### Voice Activity Detection Segment - -| Parameter | Type | Description | Notes | -| --------- | ------ | ------------------------------------------------ | ----- | -| tag | String | Tag for the corresponding segment, eg: `speech`. | | -| start | Float | Start of the audio segment. | | -| end | Float | end of the audio segment. | | - -> Note: Currently supported tags: noise, speech, music, applause, laughter. \ No newline at end of file diff --git a/en/help.html b/en/help.html new file mode 100644 index 0000000..11fc18e --- /dev/null +++ b/en/help.html @@ -0,0 +1,7 @@ +DeepAffects · AI platform for developers \ No newline at end of file diff --git a/en/users.html b/en/users.html new file mode 100644 index 0000000..7d0b824 --- /dev/null +++ b/en/users.html @@ -0,0 +1 @@ +DeepAffects · AI platform for developers \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 0000000..c617cf2 --- /dev/null +++ b/help.html @@ -0,0 +1,7 @@ +DeepAffects · AI platform for developers \ No newline at end of file diff --git a/img/deepaffects-logo-white-fill.png b/img/deepaffects-logo-white-fill.png new file mode 100644 index 0000000..f9102d3 Binary files /dev/null and b/img/deepaffects-logo-white-fill.png differ diff --git a/website/static/img/deepaffects-logo.png b/img/deepaffects-logo.png similarity index 100% rename from website/static/img/deepaffects-logo.png rename to img/deepaffects-logo.png diff --git a/img/docusaurus.svg b/img/docusaurus.svg new file mode 100644 index 0000000..1d8b516 --- /dev/null +++ b/img/docusaurus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..a3f8226 Binary files /dev/null and b/img/favicon.png differ diff --git a/img/favicon/favicon.ico b/img/favicon/favicon.ico new file mode 100644 index 0000000..fae20dc Binary files /dev/null and b/img/favicon/favicon.ico differ diff --git a/img/language.svg b/img/language.svg new file mode 100644 index 0000000..6619593 --- /dev/null +++ b/img/language.svg @@ -0,0 +1,3 @@ + + + diff --git a/website/static/img/oss_logo.png b/img/oss_logo.png old mode 100755 new mode 100644 similarity index 100% rename from website/static/img/oss_logo.png rename to img/oss_logo.png diff --git a/website/static/index.html b/index.html similarity index 100% rename from website/static/index.html rename to index.html diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..9ea0ede --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,20 @@ + + + https://docs.deepaffects.com/help.html weekly 0.5 + https://docs.deepaffects.com/users.html weekly 0.5 + https://docs.deepaffects.com/docs/audio-denoising-api.html hourly 1.0 + https://docs.deepaffects.com/docs/authentication.html hourly 1.0 + https://docs.deepaffects.com/docs/concepts.html hourly 1.0 + https://docs.deepaffects.com/docs/depression-prediction-api.html hourly 1.0 + https://docs.deepaffects.com/docs/emotion-recognition-api.html hourly 1.0 + https://docs.deepaffects.com/docs/errors.html hourly 1.0 + https://docs.deepaffects.com/docs/introduction.html hourly 1.0 + https://docs.deepaffects.com/docs/paralinguistic-feature-extraction-api.html hourly 1.0 + https://docs.deepaffects.com/docs/quick-start.html hourly 1.0 + https://docs.deepaffects.com/docs/realtime-emotion-recognition-api.html hourly 1.0 + https://docs.deepaffects.com/docs/realtime-speaker-identification-api.html hourly 1.0 + https://docs.deepaffects.com/docs/speaker-diairization-api.html hourly 1.0 + https://docs.deepaffects.com/docs/speaker-enrollment-api.html hourly 1.0 + https://docs.deepaffects.com/docs/speaker-identification-api.html hourly 1.0 + https://docs.deepaffects.com/docs/text-emotion-recognition-api.html hourly 1.0 + \ No newline at end of file diff --git a/users.html b/users.html new file mode 100644 index 0000000..62c4631 --- /dev/null +++ b/users.html @@ -0,0 +1 @@ +DeepAffects · AI platform for developers \ No newline at end of file diff --git a/website/.firebase/hosting.0.cache b/website/.firebase/hosting.0.cache deleted file mode 100644 index d0c15f0..0000000 --- a/website/.firebase/hosting.0.cache +++ /dev/null @@ -1,31 +0,0 @@ -index.html,1534776104933,0e472680da631ff693a207632d4ba667be50a2996d8ff7802a850dcce30f47f1 -help.html,1537351297669,6b9e5106dd7e1181072005c941c0fb08e6de233bcff5f2824bf626fc318e99f5 -404.html,1537351345096,05cbc6f94d7a69ce2e29646eab13be2c884e61ba93e3094df5028866876d18b3 -sitemap.xml,1537351297276,23b9c1a8105bc9d44028ac6a499d1a50c6a1bff3259a7897b656da81ce041f77 -users.html,1537351297679,d3a33181e1cb50d690f63a42754a9e1aea959375af64d759e6c4bebae4a7f1bc -css/prism.css,1537351296700,facc672614a1015d02a334cc19c61c46a08dee69cf18ce0f78e38c128c258d8d -css/main.css,1537351297653,e6061a9eef1f1373994ca6156f9c95f79c2d7d14bf80dfd5f37d1d1418ed2480 -docs/audio-denoising-api.html,1537351296511,9ed8152e1dc4f2479dd7cf83398bb4f0c8bd6a19ab723a49a33a5557c112250d -docs/authentication.html,1537351296526,23f0e4860bfab0d4bb63716cd25bc7fdf0ff7d809d813122ef636f2521d504e3 -docs/concepts.html,1537351296543,e8c06ead65ff1e545317e5b5cc84a70194eb7d4a1ff6dd3ad88d7587685ef607 -docs/emotion-recognition-api.html,1537351296563,97c4f9c4d4ecb0b2ec3a3110343247f3fd6f74b47688a48ae0847e05f9e31e7a -docs/introduction.html,1537351296580,62059ce97bcacd93162e3dfee55b970329922787bb50e8621d326c5508b699c5 -docs/depression-prediction-api.html,1537351296553,8f29314a00566b56ac1d11ff9550cca46d21fa18a8d57f023423c224568ea89b -docs/realtime-emotion-recognition-api.html,1537351296613,67f239c187d1c57c94332b8e5484c3e3239c13fbb11fbe08578b07e25cee4981 -docs/paralinguistic-feature-extraction-api.html,1537351296596,34b37b511c1c430702ce70280ea3bd02d0a8c4b89a243ba1c1002981574d65f8 -docs/quick-start.html,1537351296604,df067e6245a96dcdf30d65a7ac1c9e42dcfb122b19dd3e4594fe3f46db77cc53 -docs/errors.html,1537351296572,93e115251c4bfe6b3ec46fb7ab7453068f947309bc97da7fa4129f421b8ff6c0 -docs/speaker-identification-api.html,1537351296667,2fb7196729f55b70b226ae4db54c0ec977a8e4ebfeb19e711aa86efb6c30a02c -en/help.html,1537351297664,7d1f26b737f3c836e50d9fd8d9f486f38f2d4a882661bceced2418974f650631 -docs/speaker-diairization-api.html,1537351296645,4d3018a48b7cc32628a537a4239dff06010c844854b4fb27b11f966aa781b27e -docs/realtime-speaker-identification-api.html,1537351296622,bb7e920781ef86464e9d0d58e03eabc69716ff6e19cbe0717b543981cff0395f -docs/speaker-enrollment-api.html,1537351296655,be86839ef1adcac76bc66cc5e67a1a6062ccf0f6338b26890343b5a985c174fc -docs/text-emotion-recognition-api.html,1537351296676,7cffb4f9beedfe68e4fd9b7725bacc3c4e01ce0bb13c5d2758a1ccc287439912 -img/favicon.png,1537351298818,aef64fa6837cd0d15a7d498b8645dda04ab5486653a5b2efbca4fb67e0cf4736 -img/language.svg,1525369159000,7e308aea60bde10a9cfc0dd6dacc360121b00e1f3f97a38d288df161079f2ce7 -img/favicon/favicon.ico,1534776104931,3f94ad6e3d1864cd8cb4477c648c6adeefedc4bb0f222ec88555d7ed71b281aa -img/oss_logo.png,1537351298928,0b5ab2d16ab2489cde26b61a8fc4517a226724d6a713bd1123fc1944fff2f1a5 -img/deepaffects-logo-white-fill.png,1537351299388,abea8056a0c0514aacb4857b125ff3dbcc602784490449d4385741d918bca338 -img/deepaffects-logo.png,1537351299299,10128c54761b5088c69957b63c151e0791292f8f58e79d4e48ac3d9023f0f862 -en/users.html,1537351297676,431fc5d9704f8244166ffde92876ae87e553f947375aff6169e4a2272307ebb6 -img/docusaurus.svg,1537351298770,77a4e66e119c04d106c71e32d9c0cc5ac4636cb7a03e7ff2ee75fd5efa2821f9 diff --git a/website/.firebaserc b/website/.firebaserc deleted file mode 100644 index 0a3a3e8..0000000 --- a/website/.firebaserc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": { - "default": "dev-docs-e192b", - "private": "private-developer-docs" - } -} diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100755 index d6a40d3..0000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require("react"); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + "docs/" + (language ? language + "/" : "") + doc; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? language + "/" : "") + doc; - } - - render() { - const currentYear = new Date().getFullYear(); - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/firebase.json b/website/firebase.json deleted file mode 100644 index a9a0e8f..0000000 --- a/website/firebase.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "hosting": { - "public": "build/developer-docs", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ] - } -} diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 38cac1b..0000000 --- a/website/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.8.1" - } -} diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100755 index 6434d77..0000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -const siteConfig = require(process.cwd() + '/siteConfig.js'); - -function docUrl(doc, language) { - return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc; -} - -class Help extends React.Component { - render() { - let language = this.props.language || ''; - const supportLinks = [ - { - content: `Learn more using the [documentation on this site.](${docUrl( - 'doc1.html', - language - )})`, - title: 'Browse Docs', - }, - { - content: 'Ask questions about the documentation and project', - title: 'Join the community', - }, - { - content: "Find out what's new with this project", - title: 'Stay up to date', - }, - ]; - - return ( -
- -
-
-

Need help?

-
-

This project is maintained by a dedicated group of people.

- -
-
-
- ); - } -} - -module.exports = Help; diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100755 index c113bf5..0000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); -const Container = CompLibrary.Container; - -const siteConfig = require(process.cwd() + '/siteConfig.js'); - -class Users extends React.Component { - render() { - if ((siteConfig.users || []).length === 0) { - return null; - } - const editUrl = siteConfig.repoUrl + '/edit/master/website/siteConfig.js'; - const showcase = siteConfig.users.map((user, i) => { - return ( - - {user.caption} - - ); - }); - - return ( -
- -
-
-

Who's Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/sidebars.json b/website/sidebars.json deleted file mode 100755 index fde131f..0000000 --- a/website/sidebars.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "docs": { - "Get Started": [ - "introduction", - "quick-start", - "authentication", - "errors", - "concepts", - "faqs" - ], - "Generic Audio Analysis": [ - "interaction-analytics-api", - "speaker-diarization-api", - "speech-to-text-api", - "speaker-enrollment-api", - "speaker-identification-api", - "realtime-speaker-identification-api", - "voice-activity-detection-api", - "emotion-recognition-api", - "realtime-emotion-recognition-api", - "audio-denoising-api" - ], - "Generic Text Analysis": [ - "text-summary-api", - "text-emotion-recognition-api", - "text-punctuation-api", - "text-playbook-group-api", - "text-playbook-api" - ], - "Generic Video Analysis": [ - "chapter-detection-api" - ] - } -} diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100755 index f6070da..0000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// See https://docusaurus.io/docs/site-config.html for all the possible -// site configuration options. - -/* List of projects/orgs using your project for the users page */ -const users = [ - { - caption: "User1", - // You will need to prepend the image path with your baseUrl - // if it is not '/', like: '/test-site/img/docusaurus.svg'. - image: "/img/deepaffects-logo-white-fill.png", - infoLink: "https://www.deepaffects.com", - pinned: true - } -]; - -const siteConfig = { - title: "" /* title for your website */, - tagline: "The new standard for speech analysis APIs for developers", - url: "https://docs.deepaffects.com" /* your website url */, - baseUrl: "/" /* base url for your project */, - // For github.io type URLs, you would set the url and baseUrl like: - // url: 'https://facebook.github.io', - // baseUrl: '/test-site/', - - // Used for publishing and more - projectName: "developer-docs", - organizationName: "SEERNET", - - // For top-level user or org sites, the organization is still the same. - // e.g., for the https://JoelMarcey.github.io site, it would be set like... - // organizationName: 'JoelMarcey' - - // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [], - - // If you have users set above, you add it here: - users, - - /* path to images for header/footer */ - headerIcon: "img/deepaffects-logo-white-fill.png", - footerIcon: "", - favicon: "img/favicon/favicon.ico", - - /* colors for website */ - colors: { - primaryColor: "#2e2e2e", - secondaryColor: "#205C3B" - }, - - /* custom fonts for website */ - /*fonts: { - myFont: [ - "Times New Roman", - "Serif" - ], - myOtherFont: [ - "-apple-system", - "system-ui" - ] - },*/ - - // This copyright info is used in /core/Footer.js and blog rss/atom feeds. - copyright: "Copyright © " + new Date().getFullYear() + " DeepAffects", - - highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks - theme: "default" - }, - - // Add custom scripts here that would be placed in