Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Monday, April 3, 2023

Lesson 2 (Data Types in JavaScript)

Learning JavaScript as a Second Language

Number

Declaring Integer type variable in JavaScript :-

var x = 23;

let x = 20;

Declaring Floating point value in JavaScript :-

var x = 5.78945146;

console.log(x.toFixed(2));

Output: "5.78"

5.789.toFixed(2) would return a value of String type.

JavaScript has a single number type. Internally, it is represented as 64-bit floating point, the same as Java’s double. Unlike most other programming languages, there is no separate integer type, so 1 and 1.0 are the same value. This is a significant convenience because problems of overflow in short integers are completely avoided, and all you need to know about a number is that it is a number. A large class of numeric type errors is avoided.

Ref: Douglas Crockford - JavaScript. The Good Parts (2008)

Comparing int and float in JavaScript

Comparing int and float in Python

Strings

Declaring String variable in JavaScript :-

// Using string template

var variable = “Gokul Krishna”

// Using String class

var variable = new String(“Gokul Krishna”);

String Concatenation

Ref: https://www.w3schools.com/jsref/jsref_obj_string.asp

Boolean in JavaScript

let x = true;

let y = false;

let result = x.toString();

console.log(result);

In Python:

Arrays in Code

var arr_num = [1, 2, 3, 0, -5, -2]

let arr_names = ['Dip', 'Gokul', 'Krishna', 'Ashish']

let arr_of_mixed_types = [1, 'Krishna', true]

/* To name a few operations that we can do on an array:

(1) Traversing or 'Iterating over the elements of an array' (2) Sort (3) Search (4) Insertion (5) Deletion (6) Reversing */

console.log(arr_num)

console.log(arr_num.sort()) // Changes the actual object. Return type: modified array.

console.log(arr_num.reverse()) // Changes the actual object.

// These operations sort() and reverse() change the actual object.

// The push() method adds new items to the end of an array.

arr_num.push(10)

console.log(arr_num)

console.log(arr_of_mixed_types)

Array Ref: https://www.w3schools.com/jsref/jsref_obj_array.asp

Note: String Methods had "match" and "search" for search while Array Methods has "find".

Tags: Technology,JavaScript,

Sunday, April 2, 2023

Learning JavaScript as a Second Language (Lesson 1)

JavaScript’s First Lesson

Questions

  • Are you familiar with Programming?
  • Which programming languages do you know?
  • As in: Java, C, C++, Python (or maybe JavaScript itself)
  • How much would you rate yourself in JavaScript out of 10?
  • How much would you rate yourself in Python out of 10?

  • Have you any of experience of coding in JavaScript?
  • VSCode is not an environment. It is an editor.
  • What was the environment you were coding in?
  • Like: Console, or Browser, Node.js

What is a Developer Console (or DevTools) in Browser?

A developer console (also known as DevTools or Developer Tools) in a browser is a built-in set of debugging and analysis tools that enable developers to inspect and debug web pages or web applications. It provides various features for developers to examine the structure and behavior of web pages, including:

Inspecting HTML and CSS: Developers can view the HTML and CSS code of a web page and make changes to them in real-time to see how they affect the appearance of the page.

Debugging JavaScript: Developers can set breakpoints in their JavaScript code and step through it to find and fix bugs.

Monitoring network activity: Developers can monitor network requests and responses to identify performance issues or errors.

Analyzing performance: Developers can measure the performance of a web page, including load times, resource usage, and memory consumption.

The developer console is a powerful tool that can help developers troubleshoot issues and optimize the performance of their web applications. It is built into most modern web browsers and can be accessed by pressing F12 or by right-clicking on a web page and selecting "Inspect" from the context menu.

Developer Tools in Chrome

Developer Tools in Firefox

Where to run the JavaScript code?

  • Where to run the JavaScript code?
  • In console
  • In browser
  • In Node.js environment

In Console

In Browser


In Node.js

  • Installing Node.js on Ubuntu
  • $ sudo apt install nodejs
  • $ sudo apt install npm

Data Types

  • What all data types are you aware of?
  • 1. String
  • 2. Number (in JavaScript all Integer, Float and Double fall under the type "number")
  • 3. Boolean
  • 4. Array (also called List in Python)
Homework for both Python and JavaScript
1. Declare a variable with the above mentioned data types.
2. Also process that variable in some way. (Or we can say: show some operation on it)

String

  • String Concatenation

Differences between var, let and const

Tags: Technology,JavaScript,

Thursday, March 9, 2023

JavaScript Books (Mar 2023)

Download Books
1.
JavaScript: The Good Parts
Douglas Crockford, 2008

2.
A Smarter Way to Learn JavaScript
Mark Myers, 2014

3.
JavaScript and JQuery: Interactive Front-End Web Development
Jon Duckett, 2013

4.
Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript
David Herman, 2012

5.
You Don't Know JS: Scope & Closures
Kyle Simpson, 2014

6.
Eloquent JavaScript, 3rd Edition: A Modern Introduction to Programming
Marijn Haverbeke, 2018

7.
Head First JavaScript Programming: A Brain-Friendly Guide
Elisabeth Robson, 2014

8.
Eloquent JavaScript: A Modern Introduction to Programming
Marijn Haverbeke, 2011

9.
Secrets of the JavaScript Ninja
John Resig, 2008

10.
Learn JavaScript Visually: With Interactive Exercises
Ivelin Demirov, 2014

11.
The Principles of Object-Oriented JavaScript
Nicholas C. Zakas, 2014

12.
JavaScript: The Definitive Guide: Master the World's Most-Used Programming Language
David Flanagan, 2002

13.
Javascript: The Definitive Guide, 5th edition
David Flanagan, 2006

14.
Beginning JavaScript
Paul Wilton, 2000

15.
Professional JavaScript for Web Developers
Nicholas C. Zakas, 2005

16.
Programming JavaScript Applications: Robust Web Architecture with Node, HTML5, and Modern JS Libraries
Eric Elliott, 2014

17.
Speaking JavaScript: An In-Depth Guide for Programmers
Axel Rauschmayer, 2014

18.
JavaScript Patterns
Stoyan Stefanov, 2010

19.
You Don't Know JS Yet: Get Started
Kyle Simpson, 2020

20.
JavaScript for Kids: A Playful Introduction to Programming
Nick Morgan, 2014

21.
Learning JavaScript Design Patterns
Addy Osmani, 2012

22.
JavaScript: The Definitive Guide
David Flanagan, 1996

23.
You Don't Know JS: ES6 & Beyond
Kyle Simpson, 2015

24.
JavaScript Enlightenment
Cody Lindley, 2012

25.
Eloquent Javascript: A Modern Introduction to Programming
Marijn Haverbeke, 2011

26.
JavaScript from Beginner to Professional: Learn JavaScript Quickly by Building Fun, Interactive, and Dynamic Web Apps, Games, and Pages
Rob Percival, 2021

27.
Node.js in Action
Marc Harter, 2011

28.
Coding with JavaScript For Dummies
Eva Holland, 2015

29.
JavaScript Cookbook
Shelley Powers, 2010

30.
Professional JavaScript for Web Developers
Matt Frisbie, 2019

31.
Learn JavaScript Quickly: A Complete Beginner's Guide to Learning JavaScript, Even If You're New to Programming
Code Quickly, 2020

32.
Understanding ECMAScript 6: The Definitive Guide for JavaScript Developers
Nicholas C. Zakas, 2016

33.
JavaScript: The Missing Manual
David Sawyer McFarland, 2008

34.
Maintainable JavaScript
Nicholas C. Zakas, 2012

35.
High Performance JavaScript
Nicholas C. Zakas, 2010

36.
Pro JavaScript Design Patterns
Ross Harmes, 2007

37.
JavaScript For Kids For Dummies
Eva Holland, 2015

38.
JavaScript for Impatient Programmers
Axel Rauschmayer, 2019

39.
Up & Going
Kyle Simpson, 2015

40.
Node.js Design Patterns - Third Edition: Design and Implement Production-grade Node.js Applications Using Proven Patterns and Techniques
Mario Casciaro, 2020

41.
You Don't Know JS: Types & Grammar
Kyle Simpson, 2015

42.
jQuery in Action
Bear Bibeault, 2008

43.
Javascript: This Book Includes : Javascript Basics For Beginners + Javascript Front End Programming + Javascript Back End Programming
Andy Vickler, 2021

44.
Structure and Interpretation of Computer Programs
Gerald Jay Sussman, 1985

45.
Learning Web Design
Jennifer Niederst Robbins, 2012

46.
Object-Oriented JavaScript
Kumar Chetan Sharma, 2013

47.
Beginning JavaScript and CSS Development with JQuery
Richard York, 2009

48.
Test-Driven JavaScript Development
Christian Johansen, 2011

49.
Effective TypeScript: 62 Specific Ways to Improve Your TypeScript
Dan Vanderkam, 2019

50.
The Road to Learn React: Your Journey to Master Plain Yet Pragmatic React. Js
Robin Wieruch, 2017

51.
React Key Concepts: Consolidate Your Knowledge of React's Core Features
Maximilian Schwarzmuller, 2022

52.
Data Structures and Algorithms with JavaScript
Michael McMillan
O'Reilly Media (2014)

53.
Knockout.js (Building Dynamic Client-Side Web Applications)
Jamie Munro
O'Reilly Media (2014)

54.
JavaScript for Dummies
Emily A. Vander Veer
Wiley Pub (2005)
Tags: Technology,List of Books,JavaScript,

Wednesday, February 15, 2023

Books on 'Game Development Using JS' (Feb 2023)

Download Books

1: HTML Canvas Graphics

1.1. Eric Rowell - HTML5 Canvas Cookbook - Packt (2011) 1.2. James L. Williams - Learning HTML5 Game Programming - Addison-Wesley Professional (2011) 1.3. David Flanagan - Canvas Pocket Reference - OReilly Media (2010) 1.4. Steve Fulton, Jeff Fulton - HTML5 Canvas - O'Reilly Media (2011)

2: Game Development

2.1. Juriy Bura, Paul Coates - Pro Android Web Game Apps. Using HTML5, CSS3 and JavaScript-Apress (2012) 2.2. Karl Bunyan - Build an HTML5 Game. A Developer's Guide with CSS and JavaScript-No Starch Press (2015) 2.3. Rex van der Spuy - Foundation game design with HTML5 and JavaScript-Apress (2012)
Tags: JavaScript,Web Development,List of Books,

Saturday, October 15, 2022

JavaScript RegEx Solved Interview Problem (Oct 2022)

Question

Update JSON-like object that contains new lines and comments. I'm working on a Node application where I make a call to external API. I receive a response which looks exactly like this: { "data": "{\r\n // comment\r\n someProperty: '*',\r\n\r\n // another comment\r\n method: function(e) {\r\n if (e.name === 'something') {\r\n onSomething();\r\n }\r\n }\r\n}" } So as you can see it contains some comments, new line characters etc. I would like parse it somehow to a proper JSON and then update the method property with completely different function. What would be the best (working) way to achieve it? I've tried to use comment-json npm package, however it fails when I execute parse(response.data).

Answer

<script> function get_response() { return JSON.stringify({ "data": "{\r\n // comment\r\n someProperty: '*',\r\n\r\n // another comment\r\n method: function(e) {\r\n if (e.name === 'something') {\r\n onSomething();\r\n }\r\n }\r\n}" }); } var resp = get_response() console.log("Response before formatting: " + resp); resp = resp.replace(/\/.*?\\r\\n/g, ""); resp = resp.replace(/\\r\\n/g, ""); console.log("Response after formatting: " + resp); console.log("And JSON.parse()") console.log(JSON.parse(resp)) </script>
Tags: Technology,JavaScript,

MongoDB and Node.js Installation on Ubuntu (Oct 2022)

Part 1: MongoDB

(base) ashish@ashishlaptop:~/Desktop$ sudo apt-get install -y mongodb-org=6.0.2 mongodb-org-database=6.0.2 mongodb-org-server=6.0.2 mongodb-org-mongos=6.0.2 mongodb-org-tools=6.0.2 Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages. References 1) Install MongoDB (latest) on Ubuntu 2) Install MongoDB (v6.0) on Ubuntu 3) Install MongoDB (v5.0) on Ubuntu

Resolution

Dated: 2022-Oct-14 MongoDb has no official build for ubuntu 22.04 at the moment. Ubuntu 22.04 has upgraded libssl to 3 and does not propose libssl1.1 You can force the installation of libssl1.1 by adding the ubuntu 20.04 source: $ echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list $ sudo apt-get update $ sudo apt-get install libssl1.1 Then use your commands to install mongodb-org. Then delete the focal-security list file you just created: $ sudo rm /etc/apt/sources.list.d/focal-security.list [ Ref ]

Part 2: Node.js

(base) ashish@ashishlaptop:~/Desktop/node$ node Command 'node' not found, but can be installed with: sudo apt install nodejs (base) ashish@ashishlaptop:~/Desktop/node$ sudo apt install nodejs (base) ashish@ashishlaptop:~/Desktop/node$ node -v v12.22.9 (base) ashish@ashishlaptop:~/Desktop/node$ npm Command 'npm' not found, but can be installed with: sudo apt install npm $ sudo apt install npm (base) ashish@ashishlaptop:~/Desktop/node$ npm -v 8.5.1

Issue when MongoDB client is not installed

(base) ashish@ashishlaptop:~/Desktop/node$ node Welcome to Node.js v12.22.9. Type ".help" for more information. > var mongo = require('mongodb'); Uncaught Error: Cannot find module 'mongodb' Require stack: - <repl> at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15) at Function.Module._load (internal/modules/cjs/loader.js:667:27) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) { code: 'MODULE_NOT_FOUND', requireStack: [ '<repl>' ] } > (base) ashish@ashishlaptop:~/Desktop/node$ npm install mongodb added 20 packages, and audited 21 packages in 35s 3 packages are looking for funding run `npm fund` for details found 0 vulnerabilities

After mongoDB client has been installed

> var mongo = require('mongodb'); undefined >
Tags: Technology,Database,JavaScript,Linux,

Friday, October 14, 2022

Node.js and MongoDB Solved Interview Problem (Oct 2022)

Question:

I'm making 2 queries (or a single query) to the database. 
What I want to achieve:

If one of them is null, I want to add the value 'nil'. Example:

field1: nil,
field2: 'value'

If both are null, then I want it to respond with the 'not found' message.

What's a good approach for this?

Answer:

First, we setup the local database.

Running a local instance

(base) ashish@ashishlaptop:~/Desktop$ mongosh Current Mongosh Log ID: 63498870b0f4b94029f7b626 Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.0 Using MongoDB: 6.0.2 Using Mongosh: 1.6.0 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy). You can opt-out by running the disableTelemetry() command. ------ The server generated these startup warnings when booting 2022-10-14T21:33:50.958+05:30: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem 2022-10-14T21:33:52.643+05:30: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2022-10-14T21:33:52.644+05:30: vm.max_map_count is too low ------ ------ Enable MongoDB's free cloud-based monitoring service, which will then receive and display metrics about your deployment (disk utilization, CPU, operation statistics, etc). The monitoring data will be available on a MongoDB website with a unique URL accessible to you and anyone you share the URL with. MongoDB may use this information to make product improvements and to suggest MongoDB products and deployment options to you. To enable free monitoring, run the following command: db.enableFreeMonitoring() To permanently disable this reminder, run the following command: db.disableFreeMonitoring() ------ test> test> db test test> show dbs admin 40.00 KiB config 12.00 KiB local 72.00 KiB test> test> test> db.createCollection("ccn1") { ok: 1 } test> db.ccn1.insertOne({"name":"Ashish Jain","address":"Delhi"}) { acknowledged: true, insertedId: ObjectId("634989627d163a41b75e1e13") } test> Next Command db.ccn1.insertMany([ {"name":"","address":"India"}, {"name":"","address":""}, {"name":"Ash","address":""} ]) test> db.ccn1.insertMany([ ... {"name":"","address":"India"}, ... {"name":"","address":""}, ... {"name":"Ash","address":""} ... ]) { acknowledged: true, insertedIds: { '0': ObjectId("634989cc7d163a41b75e1e14"), '1': ObjectId("634989cc7d163a41b75e1e15"), '2': ObjectId("634989cc7d163a41b75e1e16") } } test>

Our Database Looks Like This

[ { _id: new ObjectId("634989627d163a41b75e1e13"), name: 'Ashish Jain', address: 'Delhi' }, { _id: new ObjectId("634989cc7d163a41b75e1e14"), name: '', address: 'India' }, { _id: new ObjectId("634989cc7d163a41b75e1e15"), name: '', address: '' }, { _id: new ObjectId("634989cc7d163a41b75e1e16"), name: 'Ash', address: '' } ]

This is our Node.js code in file "script.js"

var MongoClient = require('mongodb').MongoClient; var url = "mongodb://localhost:27017/"; MongoClient.connect(url, function(err, db) { if (err) throw err; var dbo = db.db("test"); var all_docs = dbo.collection("ccn1").find({}).toArray(function(err, result) { if (err) throw err; for (i in result){ if(result[i]['name'] && result[i]['address']) { console.log("name: " + result[i]['name']) console.log("address: " + result[i]['address']) } else if (result[i]['name'] && !result[i]['address']){ console.log("name: " + result[i]['name']) console.log("address: nil") } else if (!result[i]['name'] && result[i]['address']){ console.log("name: nil") console.log("address: " + result[i]['address']) } else { console.log("Not Found") } console.log() } db.close(); }); });

This is our output

(base) ashish@ashishlaptop:~/Desktop/software/node$ node script.js name: Ashish Jain address: Delhi name: nil address: India Not Found name: Ash address: nil
Tags: Technology,Database,JavaScript,

Sunday, March 13, 2022

Text to Speech APIs in different browsers for Ubuntu 21.10

OS Information

(base) ashish@ashishdesktop:~$ uname Linux (base) ashish@ashishdesktop:~$ uname -a Linux ashishdesktop 5.13.0-35-generic #40-Ubuntu SMP Mon Mar 7 08:03:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux (base) ashish@ashishdesktop:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.10 Release: 21.10 Codename: impish

Firefox Does Not Have Text-to-Speech Support on Ubuntu as of Ubuntu 21.10

Logs From Firefox Console:

>>> window.speechSynthesis.getVoices()

Array []
length: 0
<prototype>: Array []

In Google Chrome, We Have 19 Voices Available

Logs From Chrome Console

>>> window.speechSynthesis.getVoices()

(19) [SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice]

0: SpeechSynthesisVoice {voiceURI: 'Google Deutsch', name: 'Google Deutsch', lang: 'de-DE', localService: false, default: true}

1: SpeechSynthesisVoice {voiceURI: 'Google US English', name: 'Google US English', lang: 'en-US', localService: false, default: false}

2: SpeechSynthesisVoice {voiceURI: 'Google UK English Female', name: 'Google UK English Female', lang: 'en-GB', localService: false, default: false}

3: SpeechSynthesisVoice {voiceURI: 'Google UK English Male', name: 'Google UK English Male', lang: 'en-GB', localService: false, default: false}

4: SpeechSynthesisVoice {voiceURI: 'Google español', name: 'Google español', lang: 'es-ES', localService: false, default: false}

5: SpeechSynthesisVoice {voiceURI: 'Google español de Estados Unidos', name: 'Google español de Estados Unidos', lang: 'es-US', localService: false, default: false}

6: SpeechSynthesisVoice {voiceURI: 'Google français', name: 'Google français', lang: 'fr-FR', localService: false, default: false}

7: SpeechSynthesisVoice {voiceURI: 'Google हिन्दी', name: 'Google हिन्दी', lang: 'hi-IN', localService: false, default: false}

8: SpeechSynthesisVoice {voiceURI: 'Google Bahasa Indonesia', name: 'Google Bahasa Indonesia', lang: 'id-ID', localService: false, default: false}

9: SpeechSynthesisVoice {voiceURI: 'Google italiano', name: 'Google italiano', lang: 'it-IT', localService: false, default: false}

10: SpeechSynthesisVoice {voiceURI: 'Google 日本語', name: 'Google 日本語', lang: 'ja-JP', localService: false, default: false}

11: SpeechSynthesisVoice {voiceURI: 'Google 한국의', name: 'Google 한국의', lang: 'ko-KR', localService: false, default: false}

12: SpeechSynthesisVoice {voiceURI: 'Google Nederlands', name: 'Google Nederlands', lang: 'nl-NL', localService: false, default: false}

13: SpeechSynthesisVoice {voiceURI: 'Google polski', name: 'Google polski', lang: 'pl-PL', localService: false, default: false}

14: SpeechSynthesisVoice {voiceURI: 'Google português do Brasil', name: 'Google português do Brasil', lang: 'pt-BR', localService: false, default: false}

15: SpeechSynthesisVoice {voiceURI: 'Google русский', name: 'Google русский', lang: 'ru-RU', localService: false, default: false}

16: SpeechSynthesisVoice {voiceURI: 'Google 普通话(中国大陆)', name: 'Google 普通话(中国大陆)', lang: 'zh-CN', localService: false, default: false}

17: SpeechSynthesisVoice {voiceURI: 'Google 粤語(香港)', name: 'Google 粤語(香港)', lang: 'zh-HK', localService: false, default: false}

18: SpeechSynthesisVoice {voiceURI: 'Google 國語(臺灣)', name: 'Google 國語(臺灣)', lang: 'zh-TW', localService: false, default: false}

length: 19
[[Prototype]]: Array(0) 

Steps For Installation of Edge on Ubuntu

1: Microsoft Edge is not available in 'Ubuntu Software Center' by default.
2:
3:
4:
5:
6:

In Microsoft Edge, We Have 93 Voices Available in Different Languages

>>> window.speechSynthesis.getVoices()

(93) [SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice]

0: SpeechSynthesisVoice {voiceURI: 'Microsoft Adri Online (Natural) - Afrikaans (South Africa)', name: 'Microsoft Adri Online (Natural) - Afrikaans (South Africa)', lang: 'af-ZA', localService: false, default: true}

1: SpeechSynthesisVoice {voiceURI: 'Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)', name: 'Microsoft Mekdes Online (Natural) - Amharic (Ethiopia)', lang: 'am-ET', localService: false, default: false}

2: SpeechSynthesisVoice {voiceURI: 'Microsoft Salma Online (Natural) - Arabic (Egypt)', name: 'Microsoft Salma Online (Natural) - Arabic (Egypt)', lang: 'ar-EG', localService: false, default: false}

3: SpeechSynthesisVoice {voiceURI: 'Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)', name: 'Microsoft Zariyah Online (Natural) - Arabic (Saudi Arabia)', lang: 'ar-SA', localService: false, default: false}

4: SpeechSynthesisVoice {voiceURI: 'Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)', name: 'Microsoft Nabanita Online (Natural) - Bangla (Bangladesh)', lang: 'bn-BD', localService: false, default: false}

5: SpeechSynthesisVoice {voiceURI: 'Microsoft Tanishaa Online (Natural) - Bengali (India)', name: 'Microsoft Tanishaa Online (Natural) - Bengali (India)', lang: 'bn-IN', localService: false, default: false}

6: SpeechSynthesisVoice {voiceURI: 'Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)', name: 'Microsoft Kalina Online (Natural) - Bulgarian (Bulgaria)', lang: 'bg-BG', localService: false, default: false}

7: SpeechSynthesisVoice {voiceURI: 'Microsoft Nilar Online (Natural) - Burmese (Myanmar)', name: 'Microsoft Nilar Online (Natural) - Burmese (Myanmar)', lang: 'my-MM', localService: false, default: false}

8: SpeechSynthesisVoice {voiceURI: 'Microsoft Joana Online (Natural) - Catalan (Spain)', name: 'Microsoft Joana Online (Natural) - Catalan (Spain)', lang: 'ca-ES', localService: false, default: false}

9: SpeechSynthesisVoice {voiceURI: 'Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)', name: 'Microsoft HiuMaan Online (Natural) - Chinese (Hong Kong)', lang: 'zh-HK', localService: false, default: false}

10: SpeechSynthesisVoice {voiceURI: 'Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)', name: 'Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)', lang: 'zh-CN', localService: false, default: false}

11: SpeechSynthesisVoice {voiceURI: 'Microsoft Yunyang Online (Natural) - Chinese (Mainland)', name: 'Microsoft Yunyang Online (Natural) - Chinese (Mainland)', lang: 'zh-CN', localService: false, default: false}

12: SpeechSynthesisVoice {voiceURI: 'Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)', name: 'Microsoft HsiaoChen Online (Natural) - Chinese (Taiwan)', lang: 'zh-TW', localService: false, default: false}

13: SpeechSynthesisVoice {voiceURI: 'Microsoft Gabrijela Online (Natural) - Croatian (Croatia)', name: 'Microsoft Gabrijela Online (Natural) - Croatian (Croatia)', lang: 'hr-HR', localService: false, default: false}

14: SpeechSynthesisVoice {voiceURI: 'Microsoft Vlasta Online (Natural) - Czech (Czech)', name: 'Microsoft Vlasta Online (Natural) - Czech (Czech)', lang: 'cs-CZ', localService: false, default: false}

15: SpeechSynthesisVoice {voiceURI: 'Microsoft Christel Online (Natural) - Danish (Denmark)', name: 'Microsoft Christel Online (Natural) - Danish (Denmark)', lang: 'da-DK', localService: false, default: false}

16: SpeechSynthesisVoice {voiceURI: 'Microsoft Dena Online (Natural) - Dutch (Belgium)', name: 'Microsoft Dena Online (Natural) - Dutch (Belgium)', lang: 'nl-BE', localService: false, default: false}

17: SpeechSynthesisVoice {voiceURI: 'Microsoft Colette Online (Natural) - Dutch (Netherlands)', name: 'Microsoft Colette Online (Natural) - Dutch (Netherlands)', lang: 'nl-NL', localService: false, default: false}

18: SpeechSynthesisVoice {voiceURI: 'Microsoft Natasha Online (Natural) - English (Australia)', name: 'Microsoft Natasha Online (Natural) - English (Australia)', lang: 'en-AU', localService: false, default: false}

19: SpeechSynthesisVoice {voiceURI: 'Microsoft Clara Online (Natural) - English (Canada)', name: 'Microsoft Clara Online (Natural) - English (Canada)', lang: 'en-CA', localService: false, default: false}

20: SpeechSynthesisVoice {voiceURI: 'Microsoft Neerja Online (Natural) - English (India)', name: 'Microsoft Neerja Online (Natural) - English (India)', lang: 'en-IN', localService: false, default: false}

21: SpeechSynthesisVoice {voiceURI: 'Microsoft Emily Online (Natural) - English (Ireland)', name: 'Microsoft Emily Online (Natural) - English (Ireland)', lang: 'en-IE', localService: false, default: false}

22: SpeechSynthesisVoice {voiceURI: 'Microsoft Abeo Online (Natural) - English (Nigeria)', name: 'Microsoft Abeo Online (Natural) - English (Nigeria)', lang: 'en-NG', localService: false, default: false}

23: SpeechSynthesisVoice {voiceURI: 'Microsoft Rosa Online (Natural) - English (Philippines)', name: 'Microsoft Rosa Online (Natural) - English (Philippines)', lang: 'en-PH', localService: false, default: false}

24: SpeechSynthesisVoice {voiceURI: 'Microsoft Leah Online (Natural) - English (South Africa)', name: 'Microsoft Leah Online (Natural) - English (South Africa)', lang: 'en-ZA', localService: false, default: false}

25: SpeechSynthesisVoice {voiceURI: 'Microsoft Sonia Online (Natural) - English (United Kingdom)', name: 'Microsoft Sonia Online (Natural) - English (United Kingdom)', lang: 'en-GB', localService: false, default: false}

26: SpeechSynthesisVoice {voiceURI: 'Microsoft Aria Online (Natural) - English (United States)', name: 'Microsoft Aria Online (Natural) - English (United States)', lang: 'en-US', localService: false, default: false}

27: SpeechSynthesisVoice {voiceURI: 'Microsoft Guy Online (Natural) - English (United States)', name: 'Microsoft Guy Online (Natural) - English (United States)', lang: 'en-US', localService: false, default: false}

28: SpeechSynthesisVoice {voiceURI: 'Microsoft Jenny Online (Natural) - English (United States)', name: 'Microsoft Jenny Online (Natural) - English (United States)', lang: 'en-US', localService: false, default: false}

29: SpeechSynthesisVoice {voiceURI: 'Microsoft Anu Online (Natural) - Estonian (Estonia)', name: 'Microsoft Anu Online (Natural) - Estonian (Estonia)', lang: 'et-EE', localService: false, default: false}

30: SpeechSynthesisVoice {voiceURI: 'Microsoft Blessica Online (Natural) - Filipino (Philippines)', name: 'Microsoft Blessica Online (Natural) - Filipino (Philippines)', lang: 'fil-PH', localService: false, default: false}

31: SpeechSynthesisVoice {voiceURI: 'Microsoft Noora Online (Natural) - Finnish (Finland)', name: 'Microsoft Noora Online (Natural) - Finnish (Finland)', lang: 'fi-FI', localService: false, default: false}

32: SpeechSynthesisVoice {voiceURI: 'Microsoft Charline Online (Natural) - French (Belgium)', name: 'Microsoft Charline Online (Natural) - French (Belgium)', lang: 'fr-BE', localService: false, default: false}

33: SpeechSynthesisVoice {voiceURI: 'Microsoft Sylvie Online (Natural) - French (Canada)', name: 'Microsoft Sylvie Online (Natural) - French (Canada)', lang: 'fr-CA', localService: false, default: false}

34: SpeechSynthesisVoice {voiceURI: 'Microsoft Denise Online (Natural) - French (France)', name: 'Microsoft Denise Online (Natural) - French (France)', lang: 'fr-FR', localService: false, default: false}

35: SpeechSynthesisVoice {voiceURI: 'Microsoft Ariane Online (Natural) - French (Switzerland)', name: 'Microsoft Ariane Online (Natural) - French (Switzerland)', lang: 'fr-CH', localService: false, default: false}

36: SpeechSynthesisVoice {voiceURI: 'Microsoft Sabela Online (Natural) - Galician (Spain)', name: 'Microsoft Sabela Online (Natural) - Galician (Spain)', lang: 'gl-ES', localService: false, default: false}

37: SpeechSynthesisVoice {voiceURI: 'Microsoft Ingrid Online (Natural) - German (Austria)', name: 'Microsoft Ingrid Online (Natural) - German (Austria)', lang: 'de-AT', localService: false, default: false}

38: SpeechSynthesisVoice {voiceURI: 'Microsoft Katja Online (Natural) - German (Germany)', name: 'Microsoft Katja Online (Natural) - German (Germany)', lang: 'de-DE', localService: false, default: false}

39: SpeechSynthesisVoice {voiceURI: 'Microsoft Leni Online (Natural) - German (Switzerland)', name: 'Microsoft Leni Online (Natural) - German (Switzerland)', lang: 'de-CH', localService: false, default: false}

40: SpeechSynthesisVoice {voiceURI: 'Microsoft Athina Online (Natural) - Greek (Greece)', name: 'Microsoft Athina Online (Natural) - Greek (Greece)', lang: 'el-GR', localService: false, default: false}

41: SpeechSynthesisVoice {voiceURI: 'Microsoft Dhwani Online (Natural) - Gujarati (India)', name: 'Microsoft Dhwani Online (Natural) - Gujarati (India)', lang: 'gu-IN', localService: false, default: false}

42: SpeechSynthesisVoice {voiceURI: 'Microsoft Hila Online (Natural) - Hebrew (Israel)', name: 'Microsoft Hila Online (Natural) - Hebrew (Israel)', lang: 'he-IL', localService: false, default: false}

43: SpeechSynthesisVoice {voiceURI: 'Microsoft Swara Online (Natural) - Hindi (India)', name: 'Microsoft Swara Online (Natural) - Hindi (India)', lang: 'hi-IN', localService: false, default: false}

44: SpeechSynthesisVoice {voiceURI: 'Microsoft Noemi Online (Natural) - Hungarian (Hungary)', name: 'Microsoft Noemi Online (Natural) - Hungarian (Hungary)', lang: 'hu-HU', localService: false, default: false}

45: SpeechSynthesisVoice {voiceURI: 'Microsoft Gudrun Online (Natural) - Icelandic (Iceland)', name: 'Microsoft Gudrun Online (Natural) - Icelandic (Iceland)', lang: 'is-IS', localService: false, default: false}

46: SpeechSynthesisVoice {voiceURI: 'Microsoft Gadis Online (Natural) - Indonesian (Indonesia)', name: 'Microsoft Gadis Online (Natural) - Indonesian (Indonesia)', lang: 'id-ID', localService: false, default: false}

47: SpeechSynthesisVoice {voiceURI: 'Microsoft Orla Online (Natural) - Irish(Ireland)', name: 'Microsoft Orla Online (Natural) - Irish(Ireland)', lang: 'ga-IE', localService: false, default: false}

48: SpeechSynthesisVoice {voiceURI: 'Microsoft Elsa Online (Natural) - Italian (Italy)', name: 'Microsoft Elsa Online (Natural) - Italian (Italy)', lang: 'it-IT', localService: false, default: false}

49: SpeechSynthesisVoice {voiceURI: 'Microsoft Nanami Online (Natural) - Japanese (Japan)', name: 'Microsoft Nanami Online (Natural) - Japanese (Japan)', lang: 'ja-JP', localService: false, default: false}

50: SpeechSynthesisVoice {voiceURI: 'Microsoft Siti Online (Natural) - Javanese (Indonesia)', name: 'Microsoft Siti Online (Natural) - Javanese (Indonesia)', lang: 'jv-ID', localService: false, default: false}

51: SpeechSynthesisVoice {voiceURI: 'Microsoft Sapna Online (Natural) - Kannada (India)', name: 'Microsoft Sapna Online (Natural) - Kannada (India)', lang: 'kn-IN', localService: false, default: false}

52: SpeechSynthesisVoice {voiceURI: 'Microsoft Aigul Online (Natural) - Kazakh (Kazakhstan)', name: 'Microsoft Aigul Online (Natural) - Kazakh (Kazakhstan)', lang: 'kk-KZ', localService: false, default: false}

53: SpeechSynthesisVoice {voiceURI: 'Microsoft Sreymom Online (Natural) - Khmer (Cambodia)', name: 'Microsoft Sreymom Online (Natural) - Khmer (Cambodia)', lang: 'km-KH', localService: false, default: false}

54: SpeechSynthesisVoice {voiceURI: 'Microsoft SunHi Online (Natural) - Korean (Korea)', name: 'Microsoft SunHi Online (Natural) - Korean (Korea)', lang: 'ko-KR', localService: false, default: false}

55: SpeechSynthesisVoice {voiceURI: 'Microsoft Keomany Online (Natural) - Lao (Laos)', name: 'Microsoft Keomany Online (Natural) - Lao (Laos)', lang: 'lo-LA', localService: false, default: false}

56: SpeechSynthesisVoice {voiceURI: 'Microsoft Everita Online (Natural) - Latvian (Latvia)', name: 'Microsoft Everita Online (Natural) - Latvian (Latvia)', lang: 'lv-LV', localService: false, default: false}

57: SpeechSynthesisVoice {voiceURI: 'Microsoft Ona Online (Natural) - Lithuanian (Lithuania)', name: 'Microsoft Ona Online (Natural) - Lithuanian (Lithuania)', lang: 'lt-LT', localService: false, default: false}

58: SpeechSynthesisVoice {voiceURI: 'Microsoft Marija Online (Natural) - Macedonian (Republic of North Macedonia)', name: 'Microsoft Marija Online (Natural) - Macedonian (Republic of North Macedonia)', lang: 'mk-MK', localService: false, default: false}

59: SpeechSynthesisVoice {voiceURI: 'Microsoft Yasmin Online (Natural) - Malay (Malaysia)', name: 'Microsoft Yasmin Online (Natural) - Malay (Malaysia)', lang: 'ms-MY', localService: false, default: false}

60: SpeechSynthesisVoice {voiceURI: 'Microsoft Sobhana Online (Natural) - Malayalam (India)', name: 'Microsoft Sobhana Online (Natural) - Malayalam (India)', lang: 'ml-IN', localService: false, default: false}

61: SpeechSynthesisVoice {voiceURI: 'Microsoft Grace Online (Natural) - Maltese (Malta)', name: 'Microsoft Grace Online (Natural) - Maltese (Malta)', lang: 'mt-MT', localService: false, default: false}

62: SpeechSynthesisVoice {voiceURI: 'Microsoft Aarohi Online (Natural) - Marathi (India)', name: 'Microsoft Aarohi Online (Natural) - Marathi (India)', lang: 'mr-IN', localService: false, default: false}

63: SpeechSynthesisVoice {voiceURI: 'Microsoft Pernille Online (Natural) - Norwegian (Bokmål, Norway)', name: 'Microsoft Pernille Online (Natural) - Norwegian (Bokmål, Norway)', lang: 'nb-NO', localService: false, default: false}

64: SpeechSynthesisVoice {voiceURI: 'Microsoft Latifa Online (Natural) - Pashto (Afghanistan)', name: 'Microsoft Latifa Online (Natural) - Pashto (Afghanistan)', lang: 'ps-AF', localService: false, default: false}

65: SpeechSynthesisVoice {voiceURI: 'Microsoft Dilara Online (Natural) - Persian (Iran)', name: 'Microsoft Dilara Online (Natural) - Persian (Iran)', lang: 'fa-IR', localService: false, default: false}

66: SpeechSynthesisVoice {voiceURI: 'Microsoft Zofia Online (Natural) - Polish (Poland)', name: 'Microsoft Zofia Online (Natural) - Polish (Poland)', lang: 'pl-PL', localService: false, default: false}

67: SpeechSynthesisVoice {voiceURI: 'Microsoft Francisca Online (Natural) - Portuguese (Brazil)', name: 'Microsoft Francisca Online (Natural) - Portuguese (Brazil)', lang: 'pt-BR', localService: false, default: false}

68: SpeechSynthesisVoice {voiceURI: 'Microsoft Raquel Online (Natural) - Portuguese (Portugal)', name: 'Microsoft Raquel Online (Natural) - Portuguese (Portugal)', lang: 'pt-PT', localService: false, default: false}

69: SpeechSynthesisVoice {voiceURI: 'Microsoft Alina Online (Natural) - Romanian (Romania)', name: 'Microsoft Alina Online (Natural) - Romanian (Romania)', lang: 'ro-RO', localService: false, default: false}

70: SpeechSynthesisVoice {voiceURI: 'Microsoft Svetlana Online (Natural) - Russian (Russia)', name: 'Microsoft Svetlana Online (Natural) - Russian (Russia)', lang: 'ru-RU', localService: false, default: false}

71: SpeechSynthesisVoice {voiceURI: 'Microsoft Sophie Online (Natural) - Serbian (Serbia)', name: 'Microsoft Sophie Online (Natural) - Serbian (Serbia)', lang: 'sr-RS', localService: false, default: false}

72: SpeechSynthesisVoice {voiceURI: 'Microsoft Thilini Online (Natural) - Sinhala (Sri Lanka)', name: 'Microsoft Thilini Online (Natural) - Sinhala (Sri Lanka)', lang: 'si-LK', localService: false, default: false}

73: SpeechSynthesisVoice {voiceURI: 'Microsoft Viktoria Online (Natural) - Slovak (Slovakia)', name: 'Microsoft Viktoria Online (Natural) - Slovak (Slovakia)', lang: 'sk-SK', localService: false, default: false}

74: SpeechSynthesisVoice {voiceURI: 'Microsoft Petra Online (Natural) - Slovenian (Slovenia)', name: 'Microsoft Petra Online (Natural) - Slovenian (Slovenia)', lang: 'sl-SI', localService: false, default: false}

75: SpeechSynthesisVoice {voiceURI: 'Microsoft Ubax Online (Natural) - Somali (Somalia)', name: 'Microsoft Ubax Online (Natural) - Somali (Somalia)', lang: 'so-SO', localService: false, default: false}

76: SpeechSynthesisVoice {voiceURI: 'Microsoft Elena Online (Natural) - Spanish (Argentina)', name: 'Microsoft Elena Online (Natural) - Spanish (Argentina)', lang: 'es-AR', localService: false, default: false}

77: SpeechSynthesisVoice {voiceURI: 'Microsoft Salome Online (Natural) - Spanish (Colombia)', name: 'Microsoft Salome Online (Natural) - Spanish (Colombia)', lang: 'es-CO', localService: false, default: false}

78: SpeechSynthesisVoice {voiceURI: 'Microsoft Dalia Online (Natural) - Spanish (Mexico)', name: 'Microsoft Dalia Online (Natural) - Spanish (Mexico)', lang: 'es-MX', localService: false, default: false}

79: SpeechSynthesisVoice {voiceURI: 'Microsoft Elvira Online (Natural) - Spanish (Spain)', name: 'Microsoft Elvira Online (Natural) - Spanish (Spain)', lang: 'es-ES', localService: false, default: false}

80: SpeechSynthesisVoice {voiceURI: 'Microsoft Tuti Online (Natural) - Sundanese (Indonesia)', name: 'Microsoft Tuti Online (Natural) - Sundanese (Indonesia)', lang: 'su-ID', localService: false, default: false}

81: SpeechSynthesisVoice {voiceURI: 'Microsoft Zuri Online (Natural) - Swahili (Kenya)', name: 'Microsoft Zuri Online (Natural) - Swahili (Kenya)', lang: 'sw-KE', localService: false, default: false}

82: SpeechSynthesisVoice {voiceURI: 'Microsoft Sofie Online (Natural) - Swedish (Sweden)', name: 'Microsoft Sofie Online (Natural) - Swedish (Sweden)', lang: 'sv-SE', localService: false, default: false}

83: SpeechSynthesisVoice {voiceURI: 'Microsoft Pallavi Online (Natural) - Tamil (India)', name: 'Microsoft Pallavi Online (Natural) - Tamil (India)', lang: 'ta-IN', localService: false, default: false}

84: SpeechSynthesisVoice {voiceURI: 'Microsoft Shruti Online (Natural) - Telugu (India)', name: 'Microsoft Shruti Online (Natural) - Telugu (India)', lang: 'te-IN', localService: false, default: false}

85: SpeechSynthesisVoice {voiceURI: 'Microsoft Premwadee Online (Natural) - Thai (Thailand)', name: 'Microsoft Premwadee Online (Natural) - Thai (Thailand)', lang: 'th-TH', localService: false, default: false}

86: SpeechSynthesisVoice {voiceURI: 'Microsoft Emel Online (Natural) - Turkish (Turkey)', name: 'Microsoft Emel Online (Natural) - Turkish (Turkey)', lang: 'tr-TR', localService: false, default: false}

87: SpeechSynthesisVoice {voiceURI: 'Microsoft Polina Online (Natural) - Ukrainian (Ukraine)', name: 'Microsoft Polina Online (Natural) - Ukrainian (Ukraine)', lang: 'uk-UA', localService: false, default: false}

88: SpeechSynthesisVoice {voiceURI: 'Microsoft Uzma Online (Natural) - Urdu (Pakistan)', name: 'Microsoft Uzma Online (Natural) - Urdu (Pakistan)', lang: 'ur-PK', localService: false, default: false}

89: SpeechSynthesisVoice {voiceURI: 'Microsoft Madina Online (Natural) - Uzbek (Uzbekistan)', name: 'Microsoft Madina Online (Natural) - Uzbek (Uzbekistan)', lang: 'uz-UZ', localService: false, default: false}

90: SpeechSynthesisVoice {voiceURI: 'Microsoft HoaiMy Online (Natural) - Vietnamese (Vietnam)', name: 'Microsoft HoaiMy Online (Natural) - Vietnamese (Vietnam)', lang: 'vi-VN', localService: false, default: false}

91: SpeechSynthesisVoice {voiceURI: 'Microsoft Nia Online (Natural) - Welsh (United Kingdom)', name: 'Microsoft Nia Online (Natural) - Welsh (United Kingdom)', lang: 'cy-GB', localService: false, default: false}

92: SpeechSynthesisVoice {voiceURI: 'Microsoft Thando Online (Natural) - Zulu (South Africa)', name: 'Microsoft Thando Online (Natural) - Zulu (South Africa)', lang: 'zu-ZA', localService: false, default: false}

length: 93
[[Prototype]]: Array(0)

Microsoft Edge: DevTools: Screenshots

English Voices in Microsoft Edge

Other Languages in Microsoft Edge

Tags: Technology,FOSS,Web Development,Natural Language Processing,JavaScript,

Wednesday, February 23, 2022

No voice in Firefox on Ubuntu 2022-Feb-23

Logs From Firefox Console:

>>> window.speechSynthesis.getVoices()

Array []
length: 0
<prototype>: Array []
Tags: Technology,JavaScript,Web Development,Linux,

Tuesday, February 22, 2022

Text to Speech using JavaScript in Firefox and Chrome (Feb 2022)

Your voice:

You have chosen the voice: .
Voice URI:
Firefox 97.0.1 (64-bit) -- Default Voice: Female
Chrome 98.0.4758.102 (Official Build) (64-bit) -- Default Voice: Male    
    

All The Available Voices in Firefox

>>> window.speechSynthesis.getVoices()

Array [ SpeechSynthesisVoice, SpeechSynthesisVoice ]
​
0: SpeechSynthesisVoice { voiceURI: "urn:moz-tts:sapi:Microsoft David Desktop - English (United States)?en-US", name: "Microsoft David Desktop - English (United States)", lang: "en-US", … }
​
1: SpeechSynthesisVoice { voiceURI: "urn:moz-tts:sapi:Microsoft Zira Desktop - English (United States)?en-US", name: "Microsoft Zira Desktop - English (United States)", lang: "en-US", … }
​
length: 2
​
<prototype>: Array []
    

All The Available Voices in Chrome

>>> window.speechSynthesis.getVoices()

(22) [SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice, SpeechSynthesisVoice]

0: SpeechSynthesisVoice {voiceURI: 'Microsoft David - English (United States)', name: 'Microsoft David - English (United States)', lang: 'en-US', localService: true, default: true}
1: SpeechSynthesisVoice {voiceURI: 'Microsoft Mark - English (United States)', name: 'Microsoft Mark - English (United States)', lang: 'en-US', localService: true, default: false}
2: SpeechSynthesisVoice {voiceURI: 'Microsoft Zira - English (United States)', name: 'Microsoft Zira - English (United States)', lang: 'en-US', localService: true, default: false}
3: SpeechSynthesisVoice {voiceURI: 'Google Deutsch', name: 'Google Deutsch', lang: 'de-DE', localService: false, default: false}
4: SpeechSynthesisVoice {voiceURI: 'Google US English', name: 'Google US English', lang: 'en-US', localService: false, default: false}
5: SpeechSynthesisVoice {voiceURI: 'Google UK English Female', name: 'Google UK English Female', lang: 'en-GB', localService: false, default: false}
6: SpeechSynthesisVoice {voiceURI: 'Google UK English Male', name: 'Google UK English Male', lang: 'en-GB', localService: false, default: false}
7: SpeechSynthesisVoice {voiceURI: 'Google español', name: 'Google español', lang: 'es-ES', localService: false, default: false}
8: SpeechSynthesisVoice {voiceURI: 'Google español de Estados Unidos', name: 'Google español de Estados Unidos', lang: 'es-US', localService: false, default: false}
9: SpeechSynthesisVoice {voiceURI: 'Google français', name: 'Google français', lang: 'fr-FR', localService: false, default: false}
10: SpeechSynthesisVoice {voiceURI: 'Google हिन्दी', name: 'Google हिन्दी', lang: 'hi-IN', localService: false, default: false}
11: SpeechSynthesisVoice {voiceURI: 'Google Bahasa Indonesia', name: 'Google Bahasa Indonesia', lang: 'id-ID', localService: false, default: false}
12: SpeechSynthesisVoice {voiceURI: 'Google italiano', name: 'Google italiano', lang: 'it-IT', localService: false, default: false}
13: SpeechSynthesisVoice {voiceURI: 'Google 日本語', name: 'Google 日本語', lang: 'ja-JP', localService: false, default: false}
14: SpeechSynthesisVoice {voiceURI: 'Google 한국의', name: 'Google 한국의', lang: 'ko-KR', localService: false, default: false}
15: SpeechSynthesisVoice {voiceURI: 'Google Nederlands', name: 'Google Nederlands', lang: 'nl-NL', localService: false, default: false}
16: SpeechSynthesisVoice {voiceURI: 'Google polski', name: 'Google polski', lang: 'pl-PL', localService: false, default: false}
17: SpeechSynthesisVoice {voiceURI: 'Google português do Brasil', name: 'Google português do Brasil', lang: 'pt-BR', localService: false, default: false}
18: SpeechSynthesisVoice {voiceURI: 'Google русский', name: 'Google русский', lang: 'ru-RU', localService: false, default: false}
19: SpeechSynthesisVoice {voiceURI: 'Google 普通话(中国大陆)', name: 'Google 普通话(中国大陆)', lang: 'zh-CN', localService: false, default: false}
20: SpeechSynthesisVoice {voiceURI: 'Google 粤語(香港)', name: 'Google 粤語(香港)', lang: 'zh-HK', localService: false, default: false}
21: SpeechSynthesisVoice {voiceURI: 'Google 國語(臺灣)', name: 'Google 國語(臺灣)', lang: 'zh-TW', localService: false, default: false}
length: 22
[[Prototype]]: Array(0)
    

Error Messages From Knockout

1#
Uncaught Error: ko.applyBindings: could not find document.body; has the document been loaded?
uc https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:84
<anonymous> file:///C:/Users/Ashish Jain/OneDrive/Desktop/Twinkle Twinkle, Little Star (Word by Word Reading).html:81

2#
Uncaught TypeError: Unable to process binding "text: function(){return selectedVoice().voiceName }"
Message: selectedVoice() is undefined
    text https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js line 74 > Function:3
    update https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:110
    q https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:79
    xd https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:55
    yd https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:55
    ha https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:54
    $ https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:52
    q https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:79
    C https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:11
    q https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:78
    l https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:76
    m https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:76
    l https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:76
    m https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:76
    l https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:76
    uc https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js:85
    <anonymous> file:///C:/Users/Ashish Jain/OneDrive/Desktop/Twinkle Twinkle, Little Star (Word by Word Reading).html:111

Message appears in console when page loads the first time, no issues in the page functionality.

This line produces the above error:
<span data-bind="text: selectedVoice().voiceName"></span>
<span data-bind="text:selectedVoice() ? selectedVoice().voiceIx : 'unknown'"></span>.

Tags: Web Development,JavaScript,Technology,

Thursday, January 27, 2022

AngularJS Saying Goodbye



1: AngularJS is now in Long Term Support (LTS) mode: Find out more. Explore End Of Life (EOL) options here. -- https://angularjs.org/ (2022-Jan-27)
2: On July 1, 2018 AngularJS entered a 3 year Long Term Support period. UPDATE (2020-07-27): Due to COVID-19 affecting teams migrating from AngularJS, we are extending the LTS by six months (until December 31, 2021). -- https://docs.angularjs.org/misc/version-support-status (2022-Jan-27)
3: Google's version of AngularJS has reached End of Life. -- https://xlts.dev/angularjs (2022-Jan-27)
4: As of January 1, 2022, Google no longer updates AngularJS to fix security, browser compatibility, or jQuery issues. The Angular team recommends upgrading to Angular (v2+) as the best path forward, but they also provided some other options. -- Wikipedia https://en.wikipedia.org/wiki/AngularJS (2022-Jan-27)
Tags: Technology,Web Development,JavaScript,FOSS,