## 3 Speech-to-Text Transcriptor
### Database of Alphabet Models
#### 3.2.2 Inverse Kinematics
Knowing how to control the angles of the arm's links \(L_{1}\) and \(L_{2}\) (\(\theta_{1}\) and \(\theta_{2}\)) in order to perform such trajectories is the most important part. This is addressed by solving the inverse kinematics problem that involves converting the position (\(x\)-\(y\) coordinates) and orientation of a manipulator end-effector from the Cartesian space to the joint space (angular domain) [33]. The human hand has approximately 19 DOF; however, these can be reduced to two translations for the handwriting task [24]. If no wrist joint is considered these translations can be performed by a standard two DOF planar arm. Because the Bioloid's arms resemble standard two DOF planar arms, the inverse kinematics for the Bioloid's arms can be solved with the kinematic models of a standard two DOF robot arm. By applying the geometric approach for solving the inverse kinematics problem [33;34], any straight line can be drawn as follows:  
1. Define the start (\(s\)) and end (\(e\)) \(x\)-\(y\) points: \(P_{s}=[x_{s},y_{s}]\), \(P_{e}=[x_{e},y_{e}]\). 2. Define the vector \(\mathbf{X}\) with \(N_{l}\) equally-spaced points between \(x_{s}\) and \(x_{e}\). 3. Define the vector \(\mathbf{Y}\) with \(N_{l}\) equally-spaced points between \(y_{s}\) and \(y_{e}\). 4. Because \(\mathbf{X}\) and \(\mathbf{Y}\) are equally-sized vectors, each [\(\mathbf{X}\)(\(i\)), \(\mathbf{Y}\)(\(i\))], where \(i=1\),..., \(N_{l}\) represents the coordinate of the \(N_{l}\)-th \(x\)-\(y\) point between \(P_{s}\) and \(P_{e}\). 5. For each [\(\mathbf{X}\)(\(i\)), \(\mathbf{Y}\)(\(i\))], compute the inverse kinematics to obtain the associated \(\theta_{1}\) and \(\theta_{2}\) angles: \[c\theta_{2}=\frac{\mathbf{X}(i)^{2}+\mathbf{Y}(i)^{2}-L_{1}^{2}-L_{2}^{2}}{2L _{1}L_{2}}\] (1) For the right arm: \[s\theta_{2}=+\sqrt{1-c\theta_{2}^{2}}\] (2) For the left arm: \[s\theta_{2}=-\sqrt{1-c\theta_{2}^{2}}\] (3) Then, \(\theta_{2}\) can be computed with the arctangent function as: \[\theta_{2}=Atan2(s\theta_{2},c\theta_{2})\] (4)  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Alphabet** & \multicolumn{2}{c}{**Straight Lines**} & \multicolumn{2}{c}{**Curved Lines - Circumferences**} \\ \cline{2-5}  & Start Point & End Point & Center, Radius & Angular Range \\ \hline t & B & N & & \\  & G & I & & \\ \hline u & G & J & K, r & \(\pi\leq\theta\leq 2\pi\) \\  & L & I & & \\ \hline v & G & N & & \\  & N & I & & \\ \hline w & G & N, where & & \\  & N(l) = N(l) \(-\) r/2 & & & \\  & N, where & & H & \\  & N(l) = N(l) \(-\) r/2 & & & \\  & H & O, where & & \\  & O, where & & & \\  & O(l) = O(l) \(-\) r/2 & & & \\ \hline x & G & O & & \\  & I & M \(\theta_{1}\) is computed as follows:  
Figure 5:0  
Figure 5:1  
Figure 5:2  
By applying the same geometric approach, any curved line can be drawn as follows:  
1. Define the reference (center) \(x\)-\(y\) point for the curve (e.g., K): \(C_{c}=[x_{c},y_{c}]\)
2. Define the vector \(\alpha\) with \(N_{c}\) equally-spaced angular points between zero and \(2\pi\). This vector defines the angular/rotation range for the radius r, which is used as follows: to draw the \"o\" character, a complete circle must be performed; thus, \(\alpha\) must vary from zero to \(2\pi\) (angular range = \(0\leq\alpha\leq 2\pi\)). For other characters, range fractions may be used: to draw the \"c\" character, \(\alpha\) should vary from \(\pi/4\)-\(7\pi/4\) (angular range = \(\pi/4\leq\alpha\leq 7\pi/4\)). By changing the location of the \(C_{c}\) point, the scale for r and the ranges for \(\alpha\), smaller curves required for characters, such as \"m\", can be drawn. 3. For each \(\alpha(i)\) where \(i\) = 1,..., \(N_{c}\), a coordinate point \([\mathbf{X}(i),\mathbf{Y}(i)]\) can be computed as follows: Figure 5:3 (8) Figure 5:4 (9)  
Because \(\alpha\), \(\mathbf{X}\) and \(\mathbf{Y}\) are equally-sized vectors, each \([\mathbf{X}(i),\mathbf{Y}(i)]\), where \(i\) = 1,..., \(N_{c}\) represents the coordinate of the \(N_{c}\)-th \(x\)-\(y\) point of the curve between zero and \(2\pi\) with radius \(r\). 4.