diff --git a/tutorials/asr/Online_ASR_Microphone_Demo_Buffered_Streaming.ipynb b/tutorials/asr/Online_ASR_Microphone_Demo_Buffered_Streaming.ipynb index 4049d938a9d4..acd2653529cf 100644 --- a/tutorials/asr/Online_ASR_Microphone_Demo_Buffered_Streaming.ipynb +++ b/tutorials/asr/Online_ASR_Microphone_Demo_Buffered_Streaming.ipynb @@ -16,7 +16,9 @@ "3. Connect to an instance with a GPU (Runtime -> Change runtime type -> select \"GPU\" for hardware accelerator)\n", "4. Run this cell to set up dependencies.\n", "5. Set up microphone for Colab\n", - "\n\nNOTE: User is responsible for checking the content of datasets and the applicable licenses and determining if suitable for the intended use.\n", + "\n", + "\n", + "NOTE: User is responsible for checking the content of datasets and the applicable licenses and determining if suitable for the intended use.\n", "\"\"\"\n", "# If you're using Google Colab and not running locally, run this cell.\n", "\n", @@ -150,45 +152,6 @@ "cfg.preprocessor.dither = 0.0\n", "cfg.preprocessor.pad_to = 0\n", "\n", - "# spectrogram normalization constants\n", - "normalization = {}\n", - "normalization['fixed_mean'] = [\n", - " -14.95827016, -12.71798736, -11.76067913, -10.83311182,\n", - " -10.6746914, -10.15163465, -10.05378331, -9.53918999,\n", - " -9.41858904, -9.23382904, -9.46470918, -9.56037,\n", - " -9.57434245, -9.47498732, -9.7635205, -10.08113074,\n", - " -10.05454561, -9.81112681, -9.68673603, -9.83652977,\n", - " -9.90046248, -9.85404766, -9.92560366, -9.95440354,\n", - " -10.17162966, -9.90102482, -9.47471025, -9.54416855,\n", - " -10.07109475, -9.98249912, -9.74359465, -9.55632283,\n", - " -9.23399915, -9.36487649, -9.81791084, -9.56799225,\n", - " -9.70630899, -9.85148006, -9.8594418, -10.01378735,\n", - " -9.98505315, -9.62016094, -10.342285, -10.41070709,\n", - " -10.10687659, -10.14536695, -10.30828702, -10.23542833,\n", - " -10.88546868, -11.31723646, -11.46087382, -11.54877829,\n", - " -11.62400934, -11.92190509, -12.14063815, -11.65130117,\n", - " -11.58308531, -12.22214663, -12.42927197, -12.58039805,\n", - " -13.10098969, -13.14345864, -13.31835645, -14.47345634]\n", - "normalization['fixed_std'] = [\n", - " 3.81402054, 4.12647781, 4.05007065, 3.87790987,\n", - " 3.74721178, 3.68377423, 3.69344, 3.54001005,\n", - " 3.59530412, 3.63752368, 3.62826417, 3.56488469,\n", - " 3.53740577, 3.68313898, 3.67138151, 3.55707266,\n", - " 3.54919572, 3.55721289, 3.56723346, 3.46029304,\n", - " 3.44119672, 3.49030548, 3.39328435, 3.28244406,\n", - " 3.28001423, 3.26744937, 3.46692348, 3.35378948,\n", - " 2.96330901, 2.97663111, 3.04575148, 2.89717604,\n", - " 2.95659301, 2.90181116, 2.7111687, 2.93041291,\n", - " 2.86647897, 2.73473181, 2.71495654, 2.75543763,\n", - " 2.79174615, 2.96076456, 2.57376336, 2.68789782,\n", - " 2.90930817, 2.90412004, 2.76187531, 2.89905006,\n", - " 2.65896173, 2.81032176, 2.87769857, 2.84665271,\n", - " 2.80863137, 2.80707634, 2.83752184, 3.01914511,\n", - " 2.92046439, 2.78461139, 2.90034605, 2.94599508,\n", - " 2.99099718, 3.0167554, 3.04649716, 2.94116777]\n", - "\n", - "cfg.preprocessor.normalize = normalization\n", - "\n", "# Disable config overwriting\n", "OmegaConf.set_struct(cfg.preprocessor, True)" ] @@ -344,8 +307,7 @@ " self.frame_overlap = frame_overlap\n", " self.n_frame_overlap = int(frame_overlap * self.sr)\n", " timestep_duration = model_definition['AudioToMelSpectrogramPreprocessor']['window_stride']\n", - " for block in model_definition['JasperEncoder']['jasper']:\n", - " timestep_duration *= block['stride'][0] ** block['repeat']\n", + " timestep_duration *= model_definition['JasperEncoder']['subsampling_factor']\n", " self.n_timesteps_overlap = int(frame_overlap / timestep_duration) - 2\n", " self.buffer = np.zeros(shape=2*self.n_frame_overlap + self.n_frame_len,\n", " dtype=np.float32)\n", @@ -519,4 +481,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +}