├── SignalRChat ├── wwwroot │ ├── js │ │ ├── site.min.js │ │ └── site.js │ ├── favicon.ico │ ├── lib │ │ ├── bootstrap │ │ │ ├── dist │ │ │ │ ├── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ └── js │ │ │ │ │ └── npm.js │ │ │ ├── .bower.json │ │ │ └── LICENSE │ │ ├── jquery-validation-unobtrusive │ │ │ ├── .bower.json │ │ │ ├── LICENSE.txt │ │ │ ├── jquery.validate.unobtrusive.min.js │ │ │ └── jquery.validate.unobtrusive.js │ │ ├── jquery │ │ │ ├── .bower.json │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ ├── .bower.json │ │ │ ├── LICENSE.md │ │ │ └── dist │ │ │ └── additional-methods.min.js │ ├── css │ │ ├── site.min.css │ │ └── site.css │ └── images │ │ ├── banner2.svg │ │ ├── banner1.svg │ │ └── banner3.svg ├── .vs │ └── SignalRChat │ │ ├── v15 │ │ ├── Server │ │ │ └── sqlite3 │ │ │ │ ├── db.lock │ │ │ │ ├── storage.ide │ │ │ │ ├── storage.ide-shm │ │ │ │ └── storage.ide-wal │ │ └── .suo │ │ └── DesignTimeBuild │ │ └── .dtbcache ├── APP_DATA │ └── dummy.txt ├── Pages │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Privacy.cshtml │ ├── About.cshtml │ ├── Privacy.cshtml.cs │ ├── Index.cshtml.cs │ ├── Contact.cshtml.cs │ ├── About.cshtml.cs │ ├── Contact.cshtml │ ├── Error.cshtml.cs │ ├── Error.cshtml │ ├── Shared │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── _CookieConsentPartial.cshtml │ │ └── _Layout.cshtml │ └── Index.cshtml ├── .gitignore ├── appsettings.Development.json ├── Hubs │ ├── Commands.cs │ ├── AttendeeInfo.cs │ └── VoiceHub.cs ├── SignalRChat.csproj.user ├── appsettings.json ├── libman.json ├── Helpers │ ├── AppSettings.cs │ └── DictionaryExtension.cs ├── Stream │ ├── SpeechAPIConnection.cs │ ├── EchoStream.cs │ └── AudioStream.cs ├── Program.cs ├── Properties │ ├── launchSettings.json │ └── PublishProfiles │ │ ├── michi-qnamaker-demo - Web Deploy.pubxml.user │ │ ├── michi-signalr-server - Web Deploy.pubxml.user │ │ ├── michi-qnamaker-demo - Web Deploy.pubxml │ │ └── michi-signalr-server - Web Deploy.pubxml ├── SignalRChat.csproj └── Startup.cs ├── .vs └── VoiceDemo │ ├── v15 │ ├── Server │ │ └── sqlite3 │ │ │ ├── db.lock │ │ │ ├── storage.ide-shm │ │ │ ├── storage.ide-wal │ │ │ └── storage.ide │ └── .suo │ └── DesignTimeBuild │ └── .dtbcache ├── AndroidClient ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── menu │ │ │ │ │ └── menu_main.xml │ │ │ │ ├── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── content_main.xml │ │ │ │ ├── drawable-v24 │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ └── drawable │ │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── michi │ │ │ │ └── videosample │ │ │ │ ├── MainActivity.java │ │ │ │ └── WaveHeader.java │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── michi │ │ │ │ └── videosample │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── michi │ │ │ └── videosample │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── .idea │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── codeStyles │ │ └── Project.xml │ └── misc.xml ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── NetCoreClient └── SignalRConsoleClient │ ├── .gitignore │ ├── whatstheweatherlike.wav │ ├── Properties │ └── launchSettings.json │ ├── SignalRConsoleClient.csproj │ ├── ConsoleOptions.cs │ └── Program.cs ├── readme.md └── VoiceDemo.sln /SignalRChat/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vs/VoiceDemo/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AndroidClient/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /AndroidClient/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SignalRChat/APP_DATA/dummy.txt: -------------------------------------------------------------------------------- 1 | # 2 | # dummy.ps1 3 | # 4 | -------------------------------------------------------------------------------- /SignalRChat/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /SignalRChat/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /bin 3 | /obj 4 | bin/ 5 | obj/ 6 | bin/Debug 7 | bin/Debug/netcoreapp2.1/* -------------------------------------------------------------------------------- /.vs/VoiceDemo/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/.vs/VoiceDemo/v15/.suo -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /NetCoreClient/SignalRConsoleClient/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /bin 3 | /obj 4 | bin/ 5 | obj/ 6 | bin/Debug 7 | bin/Debug/netcoreapp2.1/* -------------------------------------------------------------------------------- /SignalRChat/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/wwwroot/favicon.ico -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/.vs/SignalRChat/v15/.suo -------------------------------------------------------------------------------- /.vs/VoiceDemo/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/.vs/VoiceDemo/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /SignalRChat/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SignalRChat 2 | @namespace SignalRChat.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /.vs/VoiceDemo/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/.vs/VoiceDemo/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /.vs/VoiceDemo/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/.vs/VoiceDemo/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /AndroidClient/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/.vs/SignalRChat/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /NetCoreClient/SignalRConsoleClient/whatstheweatherlike.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/NetCoreClient/SignalRConsoleClient/whatstheweatherlike.wav -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | VideoSample 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/.vs/SignalRChat/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/AndroidClient/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SignalRChat/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

-------------------------------------------------------------------------------- /SignalRChat/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tikyau/android-signalr-stt-sample/master/SignalRChat/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /SignalRChat/Pages/About.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model AboutModel 3 | @{ 4 | ViewData["Title"] = "About"; 5 | } 6 |

@ViewData["Title"]

7 |

@Model.Message

8 | 9 |

Use this area to provide additional information.

10 | -------------------------------------------------------------------------------- /AndroidClient/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches/build_file_checksums.ser 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | -------------------------------------------------------------------------------- /SignalRChat/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /AndroidClient/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /NetCoreClient/SignalRConsoleClient/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "SignalRConsoleClient": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--url https://michi-signalr-server.azurewebsites.net/voice -l en-us -u hehe" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /SignalRChat/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}} -------------------------------------------------------------------------------- /SignalRChat/Hubs/Commands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace SignalRChat.Hubs 7 | { 8 | public class Commands 9 | { 10 | public static string SEND_TO_ATTENDEE = "ServerMessages"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SignalRChat/SignalRChat.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | michi-signalr-server - Web Deploy 5 | 6 | -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SignalRChat/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "SpeechAPI": { 9 | "SubscriptionKey": "", 10 | "Region": "", 11 | "EndpointUri": "" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SignalRChat/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "unpkg", 4 | "libraries": [ 5 | { 6 | "library": "@aspnet/signalr@1.1.0", 7 | "destination": "wwwroot/lib/signalr", 8 | "files": [ 9 | "dist/browser/signalr.js", 10 | "dist/browser/signalr.min.js" 11 | ] 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /SignalRChat/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace SignalRChat.Pages 9 | { 10 | public class PrivacyModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /SignalRChat/Helpers/AppSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace SignalRChat.Helpers 7 | { 8 | public class AppSettings 9 | { 10 | public string SubscriptionKey { get; set; } 11 | public string Region { get; set; } 12 | public string EndpointUri { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SignalRChat/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace SignalRChat.Pages 9 | { 10 | public class IndexModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SignalRChat/Pages/Contact.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | 7 | namespace SignalRChat.Pages 8 | { 9 | public class ContactModel : PageModel 10 | { 11 | public string Message { get; set; } 12 | 13 | public void OnGet() 14 | { 15 | Message = "Your contact page."; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SignalRChat/Pages/About.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | 7 | namespace SignalRChat.Pages 8 | { 9 | public class AboutModel : PageModel 10 | { 11 | public string Message { get; set; } 12 | 13 | public void OnGet() 14 | { 15 | Message = "Your application description page."; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /AndroidClient/app/src/test/java/com/example/michi/videosample/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.michi.videosample; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /SignalRChat/Pages/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ContactModel 3 | @{ 4 | ViewData["Title"] = "Contact"; 5 | } 6 |

@ViewData["Title"]

7 |

@Model.Message

8 | 9 |
10 | One Microsoft Way
11 | Redmond, WA 98052-6399
12 | P: 13 | 425.555.0100 14 |
15 | 16 |
17 | Support: Support@example.com
18 | Marketing: Marketing@example.com 19 |
20 | -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/jquery-validation-unobtrusive/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-validation-unobtrusive", 3 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive", 4 | "version": "3.2.9", 5 | "_release": "3.2.9", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v3.2.9", 9 | "commit": "a91f5401898e125f10771c5f5f0909d8c4c82396" 10 | }, 11 | "_source": "https://github.com/aspnet/jquery-validation-unobtrusive.git", 12 | "_target": "^3.2.9", 13 | "_originalSource": "jquery-validation-unobtrusive", 14 | "_direct": true 15 | } -------------------------------------------------------------------------------- /AndroidClient/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /SignalRChat/Stream/SpeechAPIConnection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.CognitiveServices.Speech; 6 | using Microsoft.CognitiveServices.Speech.Audio; 7 | using Microsoft.Extensions.Configuration; 8 | 9 | namespace SignalRChat.Stream 10 | { 11 | public class SpeechAPIConnection 12 | { 13 | public string SessionId { get; set; } 14 | public VoiceAudioStream AudioStream { get; set; } 15 | public SpeechRecognizer Recognizer { get; set; } 16 | public string Language { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /SignalRChat/Hubs/AttendeeInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.SignalR; 2 | using Microsoft.CognitiveServices.Speech; 3 | using Microsoft.CognitiveServices.Speech.Audio; 4 | using Microsoft.Extensions.Configuration; 5 | using Newtonsoft.Json.Linq; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Diagnostics; 9 | using System.Linq; 10 | using System.Threading.Tasks; 11 | 12 | namespace SignalRChat.Hubs 13 | { 14 | public class AttendeeInfo{ 15 | public string ID {get;set;} 16 | public string ConnectionID{get;set;} 17 | public string SpeakingLanguage{get;set;} 18 | 19 | public string PreferredLanguage{get;set;} 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /SignalRChat/wwwroot/lib/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.3.1", 16 | "_release": "3.3.1", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.3.1", 20 | "commit": "9e8ec3d10fad04748176144f108d7355662ae75e" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": "^3.3.1", 24 | "_originalSource": "jquery", 25 | "_direct": true 26 | } -------------------------------------------------------------------------------- /AndroidClient/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /SignalRChat/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace SignalRChat 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /NetCoreClient/SignalRConsoleClient/SignalRConsoleClient.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /SignalRChat/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace SignalRChat.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AndroidClient/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.2.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | maven { url 'https://csspeechstorage.blob.core.windows.net/maven/' } 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /SignalRChat/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:31047", 7 | "sslPort": 44354 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "SignalRChat": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Signalr voice recognition backend 2 | ================================= 3 | - Reference 4 | - https://stackoverflow.com/questions/15349987/stream-live-android-audio-to-server 5 | - https://github.com/msimecek/Sample-Continuous-S2T 6 | - https://github.com/msimecek/Sample-Continuous-S2T/tree/master/VideoAudioStreamerAPI 7 | 8 | Overview 9 | ======== 10 | 11 | In this sample I created a SignalR backend that receives audio data from and android device. The server streams audio data to Azure Speech API to translate voice to text and send back to Android device. 12 | 13 | To simplify backend design. I have a collection that holds Speech API client for each preferred language instead of each attendees, so that in the future this can be extended to a online conference translation service. 14 | -------------------------------------------------------------------------------- /AndroidClient/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | 15 | 16 | -------------------------------------------------------------------------------- /AndroidClient/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |